Well ive seen a lot of people talking about how obito got 'friendzoned' and did it for rin, but people got to look deeper into it.
Many are forgetting madara's influence on him. If obito had saw rin die, but hadnt met madara, then he would not want to take over the world as he had no idea how...