The Rock obviously doesnt make this salary now but rather when he was locking up with Cena at WrestleManias 28 and 29.
The Rock has a special relationship with the WWE. Millions of dollars for a very reduced contract will do that for you. But The Rock obviously doesnt need money and if he did he could make far more for far less dangerous work. The Rock didnt need to come back he wanted to. And thats a testament to the passion he has for wrestling and how grateful he is. The Rock can still bring it in the ring he still loves what he does and the WWE loves paying him for it.