Marvel trademarked the name. Marvel is very jerkfaced when it comes to copyright, I mean they sued the WWF for Hulk Hogan. In fact Marvel's Captain Marvel was pretty much just made so they could trademark the name and prevent DC from using the name on a comic cover.
Ah now that makes sense. "We can't use the name because it has been trademarked by another company" is a whole lot better than "We decided to call him Shazam because that is what a lot of people already call him"