Dancing has been around a lot longer than dance shoes. In the old days people went out dancing in whatever shoes they owned. There is a difference however between social dancing in a bar or social club and dancing in a formal dance studio.
If you are taking classes in a formal dance studio, they may well have an expensive sprung dance floor on which they won’t allow anything but dance shoes.
Many social dancers get along just fine with ordinary shoes, but you also need to consider protecting your feet. By dancing in a normal street shoe, you could find it harder to move your foot properly and thus cause long lasting damage.