I would really need to see the filings and orders. Dismissal with prejudice could result from:
1. The judge granting a motion to dismiss/summary judgment motion filed by the defendants because the plaintiffs' case is no good;
2. The plaintiffs requesting dismissal because it has become obvious that the case can't be won;
3. The plaintiffs requesting dismissal because they got what they wanted and don't need the judge to resolve whatever technically remains of the litigation;
4. The parties stipulating to a dismissal with prejudice as part of a settlement. (This is a very common settlement arrangement--that the plaintiffs get XYZ from defendants in exchange for plaintiffs requesting a dismissal with prejudice.)
You might think #3 would result in dismissal without prejudice, but often it is cheaper and faster to dismiss with prejudice--no need for a motion/hearing and no way for defendants to make a fuss.