Largely, it's legacy in the United States. When human specialists were in control of the book for a stock, the market opened at 9:30, and closed at 16:00. It probably hasn't changed for nearly a century.
More algorithms are trading around the clock though, since markets are more interconnected than ever. To trade effectively, you need to be more aware of what has happened since market close as well. More explicitly, instruments have global presences.
Running and maintaining systems, and trading 24/7 would be a major shift for a lot of institutions though. So, my guess is that it once an ATS can get approval to start trading continuously, outside human hours, the rest (including exchanges) will need to adapt.