Of all the people in the MCU who have a bone to pick with Thanos, Nebula is arguably the most entitled to eliminating him.
So when an opportunity presented itself in Guardians of the Galaxy for Nebula to betray Thanos, she understandably took it, even though it ultimately didn’t pay off.
Like the Mad Titan’s other “children,” she was taken at a young age and raised to be an assassin, but every time Nebula lost a sparring match with her sister, Gamora, one of her body parts was replaced with a cybernetic enhancement.