Zoning is part of the issue (storefronts are often required to be too large or even mandated regardless of market conditions) building codes are also an issue.
Banks are rational actors. The fact these buildings are capitalized by large financial institutions isn’t The Problem.