That's why they're called 'aircraft carriers'. The entire point of them is that the offensive firepower in the form of aircraft can reach out pretty far. They don't need to sail the carrier right up beside the enemy in order to hit him with their swords, you know.
Jokes aside, there might (eventually, maybe not today?) be a point in what you're saying. It's been a long time since 1945 when carriers last were used in a major peer conflict, and a lot has changed since then.