Because they looked at the fossils they were finding and classified them as reptiles. Then they looked at extant reptiles and built their models on how those move and behave. The first models did not have them upright, they were modeled as [large, lumbering, quadrupeds](https://render.fineartamerica.com/images/rendered/default/poster/10/8/break/images-medium-5/an-iguanodon-and-a-megalosaurus-mary-evans-picture-library.jpg). It wasn’t until a discovery of several intact iguanadon did they realize some were bipedal. When the bipedal models started being drawn, they again compared them to extant reptiles and extant reptiles drag their tails behind them.
Edit: [Here](http://www.prehistoric-wildlife.com/images/species/m/megalosaurus-reconstructions.jpg) is a good explanation