It's both.
MLB had nothing to do with the name change, they don't assign or change team names.
Arte Moreno bought the Anaheim Angels from Disney and wanted to change the name back to the Los Angeles Angels (they were called the LA Angels when they started in the 1960s, and they got the name from the historic Pacific Coast League team they replaced, also known as the Los Angeles Angels. And the "Angels" in the team name basically "comes from" the name of Los Angeles: City of Angels), mostly to expand the potential fanbase from Anaheim to the Greater Los Angeles area.
HOWEVER, in 1996, the Angels wanted to upgrade/remodel Angel Stadium, and the city of Anaheim agreed to pay for it, under the condition that the team would thus have "Anaheim" in there somewhere.
So what to do? Call them the Los Angeles Angels of Anaheim. It fulfills their legal obligation to have "Anaheim" in there, and when Anaheim sued, the Angels won.
The Angels are neither the first pro team to be called "Los Angeles" despite playing in Anaheim (the Los Angeles Rams played in Anaheim Stadium for 14 years; in fact a big part of the reason the Angels remodeled the stadium was to turn it from a football/baseball stadium into a baseball-only stadium after the Rams left), NOR the first pro team to be called "of Anaheim (the Mighty Ducks of Anaheim, now the Anaheim Ducks).
This is also not the first time the Angels have spurned the idea of naming their team after what the rest of the country pretty much views as a "suburb" of LA for a name with a broader scope: Gene Autry turned down a new stadium in Long Beach when the city insisted that the team become the Long Beach Angels. Instead, they moved to Anaheim and became the California Angels.