Right, the "as long as it's legal" is the interesting part. For instance, what if you have two entities, one of which is a "for profit" which pays full taxes, and then another that is somehow placed in a different preferential tax bracket. By shifting/transferring all of the costs to the higher tax bracket entity, and having it further reduce profits by charging low fees, and moving all of the resulting "profit" that then accrues to the lower-taxed entity.
How, and when you can engage in such activity I'll lead to tax attorneys, but it's not a no-brainer "You should always be able to charge lower fees and transfer profits away from one entity to another." There is some nuance.