Yes, they also got very sick from doing this.
How were any houses originally built?
Well, sometimes they were just built.
It's a good thing we've learned a few things since then. Not that city planning is perfect. Far from it. But it certainly does serve a purpose.
For example, you might have an acre of land, but if too much of the soil underneath is clay, or if the water table is too high, the wastewater might not drain fast enough, so it sits and stagnates or mixes with freshwater, despite having "lots of land". You generally need a surveyor to produce and sign off on a Topographical Survey to assess that.
So yeah, "there were no sewers once upon a time", sure. But if you try to build suburban-like densities out here without a solid plan signed off, you are likely to end up piping your own sewage right into your own water taps.