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.
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.
The third movie was still one of the most successful movies of all time.