Question: Do lawyers take on cases that they care about and want to win for justice, or do they work on cases that they believe they will win solely for the benefit of their own reputation?
Depends on the lawyer and where she works, as well as whether she is able to take on pro bono cases.
Many lawyers take on pro bono cases (free) because they want to help or they believe in the whatever it is they are fighting for. Some lawyers are fortunate enough to have the ability to do this in their day to day jobs. So certainly the lawyers can have pure intentions and be taking on the case purely because she wants to help the individual or society. In some cases the lawyer might benefit from press which will bring him other cases, but frequently controversial cases are a double edged sword in that regard.