It was part of a huge franchise, which it severely damaged. Of course people went in to see it. Most didn't like it, but they still paid for a ticket. However, many of them didn't bother watching the next one.
Interestingly it may be more accurate to measure performance of a movie by the initial sale of its sequel. I haven't gathered any data but I guess it'll be interesting.
Box office across all three of the sequel trilogy moves. The same is the case for the three movies in the original trilogy btw, so I guess we should conclude that "Return of the Jedi" was the only Star Wars was movie people actually liked, since The Force Awakens is one of the most successful movies of all time?
In reality, sequels tend to be less successful than the original, but can expect a certain audience. Since only very successful movies get sequels, sequels are still safer investments than original movies.