On one hand, these companies could develop some algorithms that would help them detect crypto mining and ban such users, on the other hand it would cost them resources, and it's simpler to just shut down the free tier, as they were doing it just for community. Also, it could become an arms race - miners will be using some tricks to obfuscate their mining, companies will be using solutions to detect it.
At least Bitcoin doesn't cause too much problems, because it's mined on its own dedicated hardware, but altcoins are only causing problems to many industries. People used to advocate GPU or CPU mining because it's supposedly more decentralized, but practice shows that regular people don't care about mining even if they have the hardware, so mining is still done by farms.