مَنْ points to a person; مَا points here to a thing or action.
مَنْ يَرْحَمْ يُرْحَمْ
Whoever shows mercy will be shown mercy.
Condition: يَرْحَمْ. Answer: يُرْحَمْ.
مَا تَشْرَبْ أَشْرَبْ
Whatever you drink, I will drink.
The unknown item is what is drunk, not who drinks it.