Why do bananas grow curved?
The "proximate cause" would be a differential rate of growth on the different sides of the individual bananas. If the cells on the underside of the banana are dividing faster than those on the top, that will cause the upward curvature.

As to what causes the differential growth: I'm not a banana biologist, but I would suspect that a growth hormone of some sort finds itself more highly expressed in the part of the fruit that starts out closest to the stem.

Why that hormone might have decided to start doing that, and what selective advantage it might have given the early wild bananas, I have no idea. But our modern cultivated bananas have probably been strongly encouraged to do it, for compactness of shipping, if nothing else!