You and I might assume that Detective Comics is published by DC, but what about people who don't read comics? Show them a copy of Detective Comics that doesn't have Batman (or any recognizable DC character) and the DC logo on the front cover and see if they go "Oh, that's a DC book". I've met people who think Marvel Comics publishes Batman or DC Comics publishes Spider-Man because they don't read comics ... and No, I'm not making that up. They might know a company name but they have no clue what exactly that company produces.
That's not quite the point, though. The point is that Marvel and DC, by dint of their output over the last few decades, have each built up a certain reputation in their respective brands, and it's associated with their names--to the extent that anybody cares, I'll grant you. By allowing someone else to use closely-related names, they run two risks. First, they might lose marketshare if existing fans are led astray by the similar names. Second, they can suffer (misdirected) backlash if the infringing product isn't a quality work.
I'm from New York (though not the city), so here's a real-world example. On every street corner in midtown Manhattan, there are street vendors, most of whom are selling knockoff/pirated merchandise of nearly every sort. The genuine companies hate this, first, because they're losing sales from tourists who believe they can get a Rolex for five bucks. But also, said tourist may go home, find that his new watch is garbage, and spread the word that Rolex isn't all it's cracked up to be.
(Today, you'll find far fewer watches than you will designer handbags, but since I'm not sufficiently in touch with my feminine side to worry about purses, we're going with the watches...)
This is what trademark law is all about: To the extent that anybody cares who makes your product, you have the right to defend your reputation against people trying to confuse the customer.
I'm not 100% sold on the idea that somebody couldn't publish a comic book where the word "Marvel" was part of the character name (such as Sgt Marvel or The Pink Marvel). I think the fact that it doesn't happen is because there's a fair amount of respect between the various publishers, and any small press company that tried publishing such a book would simply be sued out of existance ... not to say that they would lose the case, just that they wouldn't have enough cash to keep fighting long enough to win.
The character's name is fine. Feel free to create bunches of Marvels, supermen, hulking monsters, and so forth. You're right that this is just a "gentlemen's agreement," for the most part, and to help the fans keep everything straight. But don't dare ever consider naming your COMIC any such thing, or using the characters' names in advertising, because that's where trademarks come into effect.
That's the gist of the often-repeated dogma that "you can't copyright a name or a phrase." You can refer to someone as Clark Kent, and he can even be Superman. But the moment you make a big deal about that fact, Warner Brothers would like a word with you.
I would be more inclined to whole-heartedly believe what you guys are saying if Marvel DID NOT keep the name "Captain Marvel" Trademarked. If the word "Marvel" is what they're protecting, then they've already done that with the company name alone and don't need to TM "Captain Marvel". As it stands, my belief is that Marvel is simply trying to keep DC from being able to make a boat-load of money off of a character that they can only refer to as "Shazam".
On the other hand, Shazam is a more distinctive phrase, whereas Captain Marvel sounds utterly generic after almost seventy years. They're better off without it, advertising-wise, in my opinion.