The plan: a building in the middle and four sides facing it
Most of the United States is organised into counties, each with a county seat where the records are kept and the court sits, and across the Midwest and the South the standard plan puts the courthouse on a block of its own with commercial streets on all four sides looking inwards. Texas has 254 counties, more than any other state, so the type is thickest there and the competition between towns to build the grandest courthouse produced a genuinely remarkable stock of nineteenth-century public architecture in places with a few thousand residents.
The building in the photograph is the Denton County Courthouse-on-the-Square, finished in 1896 and standing in the middle of its square north of Dallas, now sharing itself with a county museum. The pattern repeats for hundreds of miles in every direction. If you have three hours in central Texas and want to understand how the state is put together, drive to any county seat and walk the four sides of its square rather than visiting anything with an admission desk.
Why the square outlived the ordinary main street
The geometry did the work. A town built along a single through road loses its shops the moment the road is bypassed and the retail moves to the junction. A square faces inwards, has four short frontages rather than one long one, and holds a building nobody can move — the county will not relocate its courthouse. So the cafés, the hardware shop, the chemist and the newspaper stayed put longer than they did elsewhere, and a county seat today is far more likely than a prettier village to have a hotel, a doctor and somewhere open on a Tuesday evening.
One thing to look at honestly while you are there. A great many of these squares carry a Confederate monument, most of them put up decades after the war rather than immediately after it, and some carry an empty plinth where one has been removed. Whichever you find, it is part of what the square is, and the local historical society will usually tell you the date it went up if you ask. Courthouses themselves are working public buildings: you can generally walk in, there is often a security screen, and court is genuinely in session.