Pre-Industrial covers a pretty wide range but in generally most large cities enforced strict curfews after sunset. Without modern gas or electrical lights, nighttime in a city would have consisted of an urban darkness we would find terrifying and hard to image.
As such it was generally agreed that nothing good happened after sunset. It was official policy in most cities that all business cease and everyone returned (and remained) in their home. It's not that this was resented either, nighttime in the city was exceptionally dangerous and most people preferred the safety of their homes.
In medieval Europe a church bell usually rang before sunset indicating that dusk was approaching and everyone should wrap up whatever it was they were doing and go home. This was also when the gates of a walled town were closed.
In reality most of a towns business had ceased well before dusk anyway. For example, as there was no air conditioning people in Ancient Rome would often close shop a little after noon and spend their afternoons at the baths trying to beat the heat. The romans tended to be more productive in the early hours of the day when it was cooler. So after their afternoon bath and dinner most elected to go home for the night to sleep because business began again at sunrise.
Speaking of Rome, an exception was that all horse driven carts where prohibited in the city during the day to ease traffic on the cities streets. Thus if your occupation involved horses carting supplies around town, you had to do business at night.