For the most part, they don’t. There are some banks that sell gold, but the number is increasing day by day. Even the banks that do sell gold, sell a very limited range of products. As such, if you are serious about investing in gold, then you will need to contact a reputable, large-scale dealer.
Usually, banks that do sell gold sell it in coin form. As such, unless you are okay with purchasing gold coins, you will need to look for other avenues to purchase gold from.
There are rare instances when banks may decide to sell gold. For example, it is common to see banks selling gold during times of crisis. Even the US central bank was selling gold during the coronavirus pandemic. During times of economic turmoil, gold prices often skyrocket. As such, banks want to take advantage of this by selling some of their reserves to ease the financial blow that they are facing.