Muhammad needs his followers to pray for him and ask Allah to mercy him. How can a prophet be in need of the ordinary sinful people's prayers?
Here we have more than one issue:
1- Prophet Muhammad PBUH was completely forgiven and blessed by Allah. This is a safety promise which doesn't mean that he did sins that needed to be forgiven. It is rather a promise of blessing from Allah to his prophet. In this he was unique. That is why in Dooms Day each prophet will worry only about himself. Only Prophet Muhammad PBUH will help the people and mediate for all of them.
2- Muslims pray to Allah to give peace and mercy to His Prophet to honor that generous prophet who came as a mercy for all the people to guide the whole humanity to the sufficient legislation that will keep all its followers in safety.
3- When Muslims say May Allah give peace to Prophet Muhammad and his family, they are united to be grateful and respectful to that graceful prophet as Allah ordered them to be. Allah says "Allah and His Angels pray to the prophet. All of you believers should pray for him and great him"