The race to the courthouse refers to the legal rule that the first deed, deed of trust, mortgage, lien or judgment which is recorded with the County Recorder will have priority and have greater rights than later recordings no matter when the documents were dated. The first to file may also have superior rights in other civil matters.
For example, the federal False Claims Act has a first to file rule. Only one whistleblower action can be brought based on the same facts. Thus, the first action filed bars others brought later that are based on the same facts. So there is, literally, a race to the courthouse. The first whistleblower wins the race and prevents later qui tam plaintiffs from being successful in bring a lawsuit.