When you encrypt the wallet, only the private keys are actually being encrypted. You will be prompted to enter your encryption passphrase when the private keys are needed.
Public keys in the keypool, transaction information, and other metadata remain unencrypted because they are either public information or have no effect on the security of your Bitcoin. This means that you will be able to get new addresses (they come from precomputed public keys in the keypool) and receive transactions. It is only when you try to spend any of your Bitcoin or when the keypool runs out that you will need to enter your passphrase.
It is actually safer to prompt for the passphrase when needed because then the actually important things that are encrypted (i.e. the private keys) are unencrypted in memory for as little time as possible. This reduces the risk of them being exposed.