They are called Periodic, or Frequent Batch, auctions.
This paper & earlier works it's based on were very influential in the design and regulatory framework for these: https://academic.oup.com/qje/article/130/4/1547/1916146
Here's a good intro to them: https://www.fca.org.uk/publications/research/periodic-auctio...
Volumes are small relative to the market as a whole, but execution quality is very good.
Shouldn't the question be "why not"?
More APIs than not on this planet are considered business critical and doesn't just close. Stock markets are strange as they must be highly available for a few hours and then can be shut down for the day. Imagine if AWS closed every night.
The real reason stock markets close is because financial institutions are very interested in keeping it that way. It is lucrative to play pretend stock markets after hours.
(This is a very real question all over Europe right now, and it is interesting to see which institutions talk the loudest about how beneficial a shortening of opening hours would be to just about everyone.)
The exchange wants to make more money, and people want to be able to trade at whatever time they feel like.
One data point - 40% of the French stock exchange's turnover is now in the closing auction. Other markets have a similar trend. Longer trading hours mean thinner liquidity throughout the day, and the direction of travel in Europe is strongly towards shorter trading hours.
Berlin and London time are only off by one hour.
You probably meant the US instead of Berlin/London or there is something going on I'm not aware of?
(When I started in equities in Hong Kong in 2007, the stock market was open for 4 hours a day... 10 to 12:30, two hour lunch break to drink and socialise^W^W^W have important business discussions with clients, then 14:30 to 16:00. Today it's open 5.5 hours a day. EDIT to add: "Reactions from both brokers and the restaurant industry were mixed." (1)
XETRA is open 8.5 hours a day without lunch break, while Frankfurt (FSX) is open 12 hours a day, from 8 to 8. WHY???)
(1) https://en.wikipedia.org/wiki/Hong_Kong_Stock_Exchange#Tradi...