Why did The Joker rob the mob's bank in the beginning of The Dark Knight when he didn't care for money at the end of the film?
Money wasn't the Joker's target, but Attention on him. And Chaos.
You can't rely on anyone these days. You gotta do everything yourself. Don't we? That's okay. —The Joker
Joker did break into a well protected, feared, highly secured bank which Mob keeps their money in. This wasn't a secret. The Bank was infamous for its purposes. By stealing from the mob, openly, in broad daylight, without a teeny tiny bit of a hesitation.
By doing that, he shows himself as fearless and attracts the attention (from Mob, Law enforcement and also from The Batman). His first step was getting attention of the Gotham city criminals, which he successfully did.
PS: Joker used some of the money he stole for a new suit.
The Joker robbed the Mob Bank to introduce an element of Jeopardy to the Mob, and to wrong-foot them. If you recall, the irradiated money planted into circulation by Batman/Gordon was also left in the bank, and as such the money was 'cleaned'.
Joker's operation was small; although open to 'aggressive expansion', and as such he needed the resources of the Mob to pull off his scheme, which ultimately meant the implosion of the mob itself. If he had the mob's money, it meant he could control them. The money itself is incidental (he even burns it!), it merely represents control of the mob.