When Ronda was a judoka she fought at 154 pounds. When she started MMA she fought at 145 for Strikeforce. She was obviously undefeated, but she never faced anyone with even solid amateur striking skills. Cyborg was the 145 champion at the time and Ronda petitioned the company to let her drop down to 135, a weight she knew Cyborg couldn't make, for their title at that weight. Cyborg was the only real striker at either weight. Most 135 fighters, and most female fighters in general weren't cutting much weight and the ones that were (like Miescha Tate) were wrestlers/grapplers who Ronda could beat with her judo and submissions. Several of the women Ronda beat in Strikeforce/UFC to get to 12-0 were actually 125 or even 115 fighters outside of UFC. Many of them were barely amateur quality. Some of them, like McMann and Zingano, are mom's in their mid 30s.
There's also the issue of her trainer being well known in MMA circles as being a complete fraud. His two main fighters are Rousey and her boyfriend Travis Browne. Before Browne joined their camp, he was 16-2-1 as a pro and was a legit title contender. Since joining he's 2-3 and his wins are over a guy who was terrible and then retired and one who got cut by UFC after losing too much. Browne might get cut if he loses his next fight. The trainer is also under federal investigation for identity theft and tax fraud among other things. Basically he's a leach that wormed his way into Ronda's favor without ever improving any of her skills.
So, combine a lack of real competition with a pathetic trainer and she was ripe for the picking. Enter Holly Holm who was a pro boxer with nearly 40 fights on her resume. Holm is a patty cake puncher, only 9 KOs in more than 30 pro wins, but she's naturally bigger than Ronda and she has the footwork to avoid Ronda's only effective tactic of rushing straight forward, overpowering her smaller opponent, and throwing her to the ground for an armbar. Holm simply let Ronda run into her fists for a round and then kicked her head off. Next, enter Nunes who is naturally bigger than Ronda, has dynamite in her fists, and had good enough footwork to avoid Ronda's only effective attack.
The shorter answer is Ronda is a petulant child (her olympic judo coach has shredded her character in several interviews) who was able to bully people because they were smaller, often older, much less skilled, and she is a judo savant. Nunes and Holm were fighters before Ronda was, with Nunes doing MMA since 2008 and Holm boxing all the way back to 2002, they are just the types she was avoiding for the last 4-5 years. Her downfall was buying into the image of invincibility UFC created for her instead of working with a real trainer to get better at the full MMA game.