Honest question: I often find I refer back to the rules of grammar when they prevent ambiguity or enhance clearly (often two sides of the same coin). With this phrase, what ambiguity is prevented or clarity enhanced?
The relevant concepts here are preposition stranding and pied-piping. These are not "mechanical transformations" in the sense you mean -- there are certain constraints on when a preposition can be pied-piped and when it can't.