I’m willing to accept that it’s in-character for Discord. But by the end of the show, Discord was just sort of a dumbass who couldn’t think before acting. Like, say what you want about his intentions, but what he did was objectively stupid and careless.
Imagine if Discord was characterized as this asshole trickster god that the ponies put up with because there’s nothing they can do about him. He’s always in control of the situation. They can’t browbeat him; he snaps things back to normal because he’s had his fun. Then, him losing control the Legion of Doom situation would actually mean something. These villains pulled a fast one, and now the being that’s always in control has just lost control. That would be a real “oh crap” moment.
Instead, Discord consistently screws up even the most basic tasks, so of course he was going to screw this up. Losing control of the situation should have been a humbling experience for him, but if he didn’t learn his lesson from getting betrayed by Tirek, there’s no reason to assume he learned anything this time, either. It’s only a matter of time before he tries something like this again.