Do software engineers actually implement that? That seems pretty immoral. I'd rather let them run the a/b test and steal whatever solution they end up with.
I can't find reasons why would this be immoral. I'd say it's rather aggressive and won't earn you good reputation for sure. But it's sort of fair game. Compared to many business practices (lobbying, forced arbitration, patent trolling, DMCA, price dumping etc.) this is extremely mild one.
Generally active sabotage is frowned upon as opposed to winning in fair competition.
Eh, I am sure you could convince yourself it isn't immoral... everyone in HN seems to think things like google analytics are bad because of the privacy implications, and doesn't have a problem blocking them (which would also 'mess with a/b tests'). You could just argue that you are hindering their user spying.
Not a great argument, but good enough to allow a developer to sleep at night.
True, but this is not "messing up your competitors A/B test".
In some contexts you do that or you're fired. Some people can't afford to be fired, so they do it.