The original question of why navies focus so much on surface assets, which are armed primarily for defense of the ship & other ships - instead of focusing on submarines which carry weaponry primary for offensive operations, is a very good question indeed. And a question I absolutely do not have the answer for.
One obvious reason I could see would simply be for presence & deterrence.
The presence of showing the flag on operations, and being a visible deterrent to possible adversaries. Lately, this has been in the form of a presence in the Persian Gulf to deter mischief from Iranian ships, off the coast of Africa to ward off pirates, and sailing through the Straight of Taiwan as a political message.
While a submarine may be able to engage these same potential adversaries, and be a far more frightening thought for the adversary because 'you aren't sure if there is a NATO presence here or not' -- it doesn't carry the same political, PR, visible deterrent that a big warship does.
^ And adding to this thought, boarding parties and MH assets are a surface ship kind of thing. I'm thinking in the context of our recent operations, where deploying a helicopter to an AOI is a lot faster than sailing the ship there. Being able to deploy boarding teams, as well as the deterrent of having a MH flying around, reinforces the deterrent aspect of a surface asset while also being able to seize contraband, rescue people in distress, arrest individuals if need be, etc etc.
Another reason I can think of - albeit this is a relatively new phenomenon so I'm unsure if this really counts as a contributing factor if looking at your question over the long term - is a modern ship's ability to engage enemy ICBMs. Having land-based interceptors in Hawaii and Alaska is great, but if you could also have interceptors floating around the oceans & able to possibly engage enemy ICBMs much closer to their launch point, this could be a significant benefit in favour of high-end surface assets.
Beyond that though, from a warfighting perspective - you ask a very good question. You'd think focusing on submarines would make a lot of sense.