Why does Germany have such a small stock market, but very large powerful banks?
I don't know if your statements are true. By what margin is the German stock market small? And the only bank that did matter on the international level (Deutsche Bank) is far from being large and powerful.
That being said, your notion might have to do with the fact how the German economy has been organized since WWII. The Rhine capitalism used to be, among others, characterized by strong institutional links between banks and industry. Whereas firms would finance on the stock market in the U.S., they received credits from banks in Germany who, in turn, often held stocks of these firms. This construct was called "Deutschland AG", but has been deteriorating since the early 2000s at the latest.