The reason that dismissal with prejudice prevents subsequent refiling is because this type of dismissal is considered an “adjudication on the merits.” An adjudication on the merits means that the court has made a determination on the legal and factual issues of the claim. Once a plaintiff’s claim is adjudicated on the merits, they cannot bring the same claim again. The source of this rule lies in the doctrine of res judicata.
Under Federal Rule of Civil Procedure 41(a)(B), all voluntary dismissals (i.e. the plaintiff agrees to have the case dismissed) are considered to be dismissed without prejudice, unless the agreement states otherwise. However, a voluntary dismissal will count as being dismissed with prejudice if the action at issue is the second occasion in which the plaintiff has brought and dismissed the claim.
Under FRCP 41(b), all involuntary dismissals (i.e. defendant moves for dismissal and the judge grants the motion) are considered to be adjudications on the merits, and thus dismissed with prejudice. Note that there are exceptions to this rule: dismissals for lack of jurisdiction, improper venue, or failure to join a party under FRCP 19 do not count as adjudications on the merits, and thus are considered dismissals without prejudice.
See also: Dismissal with Prejudice
[Last updated in September of 2021 by the Wex Definitions Team]