They tried to kill him for many reasons, of them are:
Chat with our AI personalities
He had to take the city for the Muslims because Muslims have to do a pilgrimage to Mecca once or more to the city, he also took it because they were using the shrine that Adam built for Pagan Gods.
Muhammad hates Mecca becasue he started to preach to the mecca people and they did not like it....
this is not true Muhammad never hated mecca you shouldn't say something you don't know about!