They have to call Captain Marvel "Shazam" on comics covers, because when DC comics sued Fawcett (the original publishers of Captain Marvel) out of business in the 1950s, the copyright on the name lapsed, and by the time they brought Captain Marvel back in the early 1970s, Marvel Comics had already established a new copyright on the name
they can call him Captain Marvel inside the comics he appears, but they can't use the name anywhere on the cover