“The thing about Clara is she thinks the show is called Clara. She really does. She has no idea she’s number two in the credits, which is why we did that joke in “Death in Heaven.” She’s got a high opinion of herself, not in a conceited way, but in a correct way. She knows she’s extremely clever and capable, and she doesn’t feel like she particularly fits in the world that she lives in. She’s a bit more like the Doctor in the first place. She’s not really very good at living a normal life. The other companions, like most people, like you and me, can be quite good at living normal lives. I’m very happy living my normal life, I’m sure you are too. Going to the shops seems fine for an adventure, but Clara’s not like that.
When I first wrote Clara, I thought, “Oh, this is fun. If the Doctor were a young woman living in contemporary Britain, it’d be a bit like her.” Clever and presentable and funny but also thinking when is something interesting going to happen? The interesting thing between the Doctor and Clara is she can sort of play the same game he does. She can absolutely do that, she’s terribly clever, she’s got a wayward ego.I think for the first time, the Doctor’s traveling with someone who’s a bit of a loony like him, and that’s quite fun.” - Steven Moffat
Honestly, what a wonderful story arc. Right from the very beginning, Clara was just meant to become more and more like the Doctor. In many ways, like the unusual cleverness, kindness, and sense of wonder and adventure, she already was. I tried to show with this video that no matter how much they love each other, and in my opinion, 'in love' with each other, obviously the Doctor and Clara will eventually clash, because they both feel like they need to be the one in charge, they just need to be in control of the situation. This 'egomaniac needy game player' sort of thing.
Then again we also have the Doctor teaching her how to do things like to keep calm during hard situations, like flying the TARDIS, etc. When she's alone, she hears the Doctor's words inside her head. In those moments she really is 'The Magician's Apprentice'!
They still love each other so much though and after a while, after they get so many wins, Clara just starts to feel like she can do whatever the hell she likes, because her and the Doctor somehow 'always fix it'. There comes a time when they can't, and how Clara reacts is utterly heart breaking.
'Why can't I be like you?'
'Be a little proud of me.'
She can't be like him, because she is not immortal like him. She doesn't have the luxury to get away from death multiple times: that's why I put the 11th Doctor's regeneration pose before Clara's death pose: She does the exact same regeneration pose like all the Doctors, arms wide open and stretched, but something is different: She doesn't explode with a magical yellow light. She just falls on the ground.