So highest-grossing doesn't mean absolutely anything about how good a movie is, or whether people actually liked it. There is a huge contingent of people that follow religiously a franchise and will pay to watch the new one even if they've been told it is not very good. You don't skip the latest Star Wars movie if you call yourself a Star Wars fan, and it is marketing's job to create the Star Wars fan in the first place.
As a cynic, I'd argue the opposite to what you said: you have to spend more on marketing if the material is not very good in the first place. The result is a terrible movie that becomes a meme and still makes bank.
Otherwise, yes, I generally agree that sales are not necessarily an indication of quality.
Marketing can boost ticket sales, but there are plenty of examples of movies which flopped despite heavy marketing, just because the audiences didn't like the movie that much.
The ratings on RT and IMDB does not represent the average audience member.
The thing is, the last trilogy was tremendously enjoyable by general audience, and this is what generates sales after initial weekend. Few butthurt starwars nerds writing endlessly on internet (just like here with consistently flawed arguments) or review bombing out of pure hate don't change anything, luckily.
I had great fun, considered it as brainless popcorn fun just as original trilogy and prequels, exactly just like everybody else I know. Sometimes, that's enough.