(...ignoring CGI for the eras that proceeded it...

)
Well, like I said, there's Marlon Brando...
And movie musicals ARE rife with performances by people who probably shouldn't/wouldn't be allowed to sing in most cases. Look at
Paint Your Wagon, for instance.
But in those cases, like Brando's, the actors' voices were so distinctive that they probably couldn't find a pro to mimic them.
Then there are things that just happen- everybody knows how and why Buddy Ebsen lost the role of the Tin Man in
The Wizard of Oz, few know that his vocals were still used in the song "We're off to see the Wizard" instead of Jack Haley's.
Still, some times, the director trumps practicality for his vision: Natalie Wood, Richard Beymer and Rita Moreno (!!!) all had their songs overdubbed in
West Side Story.
The thing is, near as I can tell, it's a trend that gained steam post-WW2. Those early B&W musicals? I doubt there was a non-singer in the cast for a lot of them. Why? Because, except for the stars, they often had people doing multiple roles.
But after that point, you see more and more (though not MANY) overdubbed singing for leads in movie musicals.