The Last Jedi's Vice Admiral Holdo is a brilliant character.
She comes out of nowhere, looks kinda silly, and won't share her plans, but we're expected to trust her based solely on Leia's word. Much like Poe, the audience is filled with doubt and some level of contempt for her. The fact that she's a woman in authority adds to that contempt for some. Casting a man would have worked too, just on a different level. It had to be an unknown for it to work, regardless.
When it turns out that Holdo's plan was solid (albeit desperate), Poe learns the error of his ways and that he should be a team player rather than a solitary hotshot. This lesson is echoed to the audience.
Now, one could argue that it was stupid of her not to share her plans with Poe, but then again, he's not in the "need to know" command circle. One could just as easily argue that he was out of line for demanding an explanation, but we let that slide because he's a protagonist.
So basically, the movie's creators made a character that would be easy to hate so that we would fall into the same trap Poe did. Some of us recognized this at the end. Some of us continued hating Holdo because we didn't understand (or refused to accept) the lesson she was written to convey.
Whether or not such a lesson belongs in a Star Wars movie is a whole other argument. I think there's no better place, and the original trilogy is full of such lessons.