At a guess I'd say the answers to the two questions are "they do legislate against some behaviours, but blocking hostile takeovers is worse than allowing them" and "the risk of that happening is built into the market price," but I don't actually know.
there is also the option of not letting people buy or sell stocks at all, which would resolve the same issues the mandatory sell provisions resolve
Publicly traded securities aren't the Wild West, and the real world has built up comparatively effective dispute resolution tooling like "courts," elected and appointed "judges," "regulators," and "prosecutors."
Not to mention "case law" and "precedence"
Those conditions and corporate structures should be regulated way more thoroughly, preventing legal fuckery such as this. Or share classes.