It makes more sense if you sort of think of the problem in the other direction. The red paint, as is noted above, is anti-fouling paint. In terms of maintenance, durability, and keeping the sub as fast and quiet as possible, it would make sense for the entire hull to be painted that color. But a red sub would be mighty conspicuous on the surface - or even below it. (The red on the few subs I've seen is a remarkably bright, almost orange-ish color. In clear water on a calm, sunny day a submarine painted that color would be visible to a human being in an airplane even if the sub were quite a few feet under water.) So the upper part gets painted black (or some other camouflage color).
I imagine (though some submarine expert may correct me here) that the whole hull initially gets painted with red primer, and the black gets applied on top of it. I don't know whether the finish coat of red is the same stuff that's used to prime the whole hull; I rather doubt it.
Youth, talent, hard work, and enthusiasm are no match for old age and treachery.