Yes this can happen sometimes. It's allowed because it's not rational over the long term from a game theory perspective. E.g. if all the miners decided to mine blocks with zero transactions simply for the block reward, then no transactions would flow through the network.
With no transactions the network would be useless and then the reward would be worthless.
Thankfully, it's not any harder to mine a block with transactions than without[1], so this shouldn't be a problem long term.
[1] Other than the fact that larger blocks can take a longer time to transfer across the network.