They can because 1) patens expire in ten years mostly, and 2) patenting ridiciolous stuff doesnt hold water with judges.
I think there was recently a company that got patent on “clicks in your email messages” and sued everyone relevant to shake out $$, and got laughted at by judge. (Im on mobile so can find relevant article atm)