Note that every state space system can be written as a transfer function, and every transfer function as a state space system.
But my straightforward answer: The reason why state-space systems, in general, are used for optimal control is simply because it is more intuitive to use them because of how cost functions are defined and how mathematical optimization techniques work. You can simply deal with it better by using state-space representation then transfer functions.
Furthermore robust control techniques also often relies on the physical interpretation of the system and frequency area's where you want the controller to be "robust" (note there is no clear definition for robust, it is whatever you will say it is). But when rewriting your system from a transfer function to a state-space system you loose every physical interpretation of the system and frequencies analysis is also not intuitive anymore.