Did you read my previous comment? I explained reasonably clearly that they didn't focus on making a good movie. You yourself are saying that destroying Luke Skywalker and redefining the Mary Sue trope doesn't seem like what the public wanted. But I'll guarantee you that there was a lot of market research which determined that:
- strong female leads are popular
- "defying expectations" is popular
- Marvel style humor is popular
And when you put those things together without caring about making a good movie, you will do things like destroying Luke Skywalker, or redefining the Mary Sue trope. These things didn't happen because they wanted them to happen, they happened because they didn't care enough to not make them happen.