Casting is a complicated and precise beast. So, it's near impossible to get it right every single time and if you're lucky enough to cast the perfect actor in a role, you deserve all the success and adulation that is sure to follow that decision.
However, when the casting of a role goes wrong and you're left having to pick up the pieces (sometimes before your film has even gone into production) it can cost your studio millions or even tarnish a character's reputation almost to the point of irepair - see Ryan Reynolds iteration of The Green Lantern.
Yet, when an actor decides to drop out of a role or simply doesn't fit the bill in the finished article, it can leave a void for another actor to fill. When all seemed lost, studios have gone back to the well time and time again to pull out a casting choice that is so inspired it makes you wonder why they didn't go that direction in the first place.
You can't always get it right first time, but sometimes those failed good intentions can leave room for something greater to fall into place.
10. Sean Connery As Gandalf In The Lord Of The Rings
When Peter Jackson decided to take on the absolute juggernaut that was The Lord of the Rings novels in the late 90's, he knew that he would need a certain calibre of actor to anchor his would-be series.
Casting Gandalf - the seasoned wizard of Middle-Earth - proved to be an early stumbling block, requiring an actor of gravitas and an almost shakespearean quality in order to stay true to his depiction in the books.
The studio turned to James Bond himself, Sean Connery, when trying to figure out who could achieve such a portrayal in their trilogy. Though undeniably mystical as an actor, Connery couldn't understand the script and confessed to still not understanding it after watching the eventual films.
He of course turned down the role and Jackson was forced to pursue another actor for the part. He happened upon a shakespearean wizard in the shape of Ian McKellen and the rest is history.
You can't help but think we were deprived of an iconic Scottish delivery of 'YOU SHALL NOT PASS!', though.