It is the biggest contract ever awarded by an English club and means Rooney is the best-paid player in the Premier League but Mata, who became United's £37.1 million club record signing in January, believes he is worth it.
Rooney scored his 208th goal for United in Saturday's 2-0 win over Crystal Palace and Mata praised the England striker in his blog.
"The game was special for Rooney after his recent renewal, and he was very happy," Mata said. "He deserves it; he is a model player in this club and it's a privilege to have him with us now and in the coming years."
Rooney, who asked to leave United in 2010 and was unsettled last summer when Sir Alex Ferguson claimed he submitted a transfer request, will become a club ambassador when he retires.
Mata believes he is starting to gel with his new colleagues and hopes the victory, which took United up to sixth, could be a springboard.
"Me, personally, after five games with the team I feel there is more and more understanding with my team-mates on the pitch. The truth is, with a squad of such quality everything is easier. These three points gave us a lot of confidence. I think the team was solid and it was a clear victory."
Mata will miss Tuesday's Champions League clash with Olympiacos as he is cup-tied after playing for Chelsea in the group stages but he is expecting a difficult game.
"The team will face a tough opponent. Olympiacos are both the leaders and the reigning champions in Greece. [Kostas] Mitroglou - their goalscorer - and [Vladimir] Weiss left the club in January, but they have signed two good players such as [Nelson Haedo] Valdez and Hernán Pérez.
"Olympiacos have a Spanish flavour with several players that have been in la Liga before: Roberto, [Javier] Saviola, Chori, David Fuster or Joel Campbell. And the same can be said about the staff: the manager is Míchel, whom I met in Real Madrid Castilla. I'll bit my nails nervously watching the game on telly."