Banks and in general holders of non-tradable claims like venture capitalists, provide an advisory service that markets cannot. However, the opportunity cost of capital on the latter is lower.
Therefore, each intermediary dominates a different niche: a large and established corporation will resort directly to the market in order to obtain funds, because it has a good rating and is unwilling to pay intermediation costs; on the other hand, a company that lacks a strong reputation is more likely to require the advisory skills of the bank (or venture capitalist) and probably can even get cheaper funding from them, at the cost of providing more information on technology and operations, with the understanding that its financier will not have incentives to make that information public.