Also if the block size is bigger there is no reason for miners to spam transactions since they would harm the network they are heavily invested in.
The bigger the max block size is, the more spam they could put in a single block. And that "heavily invested in" part may apply to Bitcoin, but definitely not to some altcoins, that are mined, and then exchanged into Bitcoin, just because mining altcoins and selling them is often more profitable (as long as mining is not fully decentralized, and as long as miners rely on centralized pools). Another thing is that if someone doesn't like some altcoin (like BSV, because of Craig), then that kind of spam can be always executed to make it even more centralized, and put even more weight on a few nodes that keeps the whole thing alive. Also, when the block size is not limited, then miners could generate that spam in a deterministic way, then the cost of storage is quite low for the attacker, but quite high for all other nodes, because they cannot compress data, without knowing the seed that was used to generate spam.
But as I said this argument is not really valid.
As always, it is a matter of choice. As vjudeu said, it is technically possible to prevent that spam, but the question is "should we?", because then some problems will vanish, and other problems will appear. Also, miners can do many things, that are far beyond what non-miners can do, but they don't, because they don't know how, or because they don't want to risk their block reward by mining some invalid block. And there is a distinction: user-based spam is one thing, it can be prevented on node-level, even without touching consensus, just by changing how minimal fees are calculated. Another thing is miner-based spam, this is harder to prevent, because it requires a soft-fork, to make that spam "invalid by consensus", and that sounds quite dangerous, and definitely should be heavily tested on user-level first.