Airline alliances are not straight jackets; airlines often have partnerships beyond alliances.
Qantas and Emirates have a very deep alliance despite Qantas being part of OneWorld, while Air NZ have a number of partnerships to cover areas they might be weak in or want to grow inward traffic.
Similarly you have the likes of Delta and United having partnerships with Gol and Azul in Brazil.
Even beyond these partnerships it often makes sense (for the same reasons above - driving inward traffic, providing onward domestic/regional connections for your passengers) to sell flights on other airlines.