I suspect that Madame Gao allowed herself to be captured, for her own purposes. There are things about her that don't add up properly, which makes me think that she is more than just a drug dealer or a leader of The Hand:
- Her pleased reaction when Danny Rand was becoming more and more focused during the final battle of the tournament.
- The fact that she once said(in Daredevil) that she knew all languages.
- The way she knocked Daredevil away with a single blow, and then appeared to knock Danny Rand away from her without even touching him.
- The way that she knew Danny was watching her when she was locked up, even before he spoke to her.
- Her use of the symbol of Shou-Lou the Undying on the drugs she sells.
Watching her in the scene when Danny follows her to the 13th Floor of the Rand building and keeping in mind that she knew Danny was outside her prison cell later on, even before he spoke to her, it seems likely that she knew Danny was listening in on her meeting on the 13th Floor. She would also have known that he could get the information on her employee's laptop.
The idea that those two bodyguards in China would be able to stop both Danny and Colleen seemed ludicrous to me, yet she ordered them to attack the women. Madame Gao herself only showed up at that building after Danny had entered it and started looking around. I suspect that she knew he was there before she even arrived, and went there for the purpose of being taken prisoner. The only time she seemed to be unhappy about the whole process was when Bakuto showed up, and even he later admitted that she refused to work with him and his people.
Madame Gao's entire demeanor in the first season of Daredevil was that of an ancient, mysterious figure whose true goals were much different from the goals that she seemed to have. At the end of season one, she told Owlsley that selling the heroin was just a means to an end, and her true purpose was something else entirely. Wilson Fisk seemed to know a great deal about her, and even though he was respectful of Nobu, the Hand's stated representative, he was much more respectful of Gao. Fisk didn't seem to treat them like they were part of the same organization at all.
I get the feeling that maybe Madame Gao is something much more than a leader of The Hand. Maybe she's not really even a villain. She's ruthless and willing to kill people, obviously, but she could be working toward some wider goal that's ultimately meant to protect or benefit the world.
Even if she's not a hidden force for good, though, I think she's definitely a lot more than what she seems to be. Probably some sort of epically powerful being that only looks like an old human lady.