F1 tried to ban team orders, or at least one teammate pulling over to let the other pass, in the '00s. They reverted back as it was hard to police. I am not sure what the current regulations state, but teams can usually hide behind the excuse that they are doing what is best for the team as a whole. In this case, Mercedes claimed that because Hamilton was vulnerable to a Vettel attack, they needed Bottas to act as a buffer. If they were more PR savvy, they would have ordered Bottas back around at the end with Vettel well behind and with Hamilton already having a large points lead.
It is a noxious and ugly practice. I'm sure it happens in other forms of racing that I don't watch, perhaps some sports and touring car stuff. It happens some in motorcycle racing. It certainly happens in cycling (bicycles) where there are large teams with a lead rider, and the other riders constantly take action to serve the anointed leader of the team.
This stuff is ingrained in the culture of F1. It was much worse historically, with secondary teammates literally giving their car to the primary driver during the race if needed. I don't know how they would realistically stop it completely. They can't fill a grid without two car teams. The best way to place highest in the drivers' and constructors' championships is to work collectively.