We all know how Teach started his own journey — by betraying Edward Newgate and the Whitebeard Pirates. But he is not the only traitor in his crew.
We know that Kuzan (Aokiji) and Shiryu are both traitors as well (in a broad sense). Kuzan left Marine after his defeat to Akainu, Shiryu was formerly head jailer of the Impel Down.
Also the original crew was part of Shichbukai and betrayed the World Government during the Impel Down and Marineford arcs.
And now they are heading to Egghead island where York currently is. She betrayed Vegapunk in the hopes of becoming Tenryuubito but she realized she was used by the World Government and they have no intention of letting her in their ranks. So she has nowhere to go, basically.
What if she joins Blackbeard Pirates? She would fit in the crew perfectly. Her brain has a lot to offer to the immense firepower of the crew; she needs a side to join in and more importantly she needs to get out alive from the Admiral and all the Marines that are approaching the island. Also with Blackbeard she might have a shot of becoming Tenryuubito if he manages to achieve his goals (we still don’t know of them, but considering his ship is named Saber of Xebec, his base is on Hachinosu Island, we can assume he might wanna conquer the world just like Rocks wanted).