Using music theory they can understand why certain composition works and then use the listeners intuition against them to subvert those expectations while still providing something coherent.
An example is something like Bleed by Meshuggah. Most people assume it uses some complex time signature but I am pretty sure its just 4/4. Periphery will have pieces that sound 4/4 but are actually 6/8s. Basically most time signatures (if not all, idk) are effectively extended 4/4, so they can create a riff that eventually hits the 4/4 your internal clock expects to hear but in between you can't necessarily find the pattern.
But like you said, music theory tells you all the rules so you can break them. It's sort of like any other set of rules. You need to understand why they are there so you can understand the right why to subvert them.