10 gauge wire with 50 amp breaker
Because it IS NOT "violating the normal code". It is following the codes allowed for A/C units. 

Electrical codes are not nearly as black and white as home centers and quick code guides will lead you to believe.

NEC 240.4(D) restricts smaller conductors (14,12&amp;10) to lower than what is in the general ampacity charts. It also says this applies unless allowed in 240.4(E) &amp; (G). 240.4(G) says 240.4(D) does not apply to certain installations, A/C units being in that list. 
Depending on the conductor and application #10cu might be rated for 30, 35 or even 40A.

If this is a bit confusing I can post all the relevant articles.