Courts cannot grant relief NOT prayed for in pleadings

It is well-settled that courts cannot grant a relief not prayed for in the pleadings or in excess of what is being sought by a party to a case.[1] The rationale for the rule was explained in Development Bank of the Philippines v. Teston,[2] viz.:
Due process considerations justify this requirement. It is improper to enter an order which exceeds the scope of relief sought by the pleadings, absent notice which affords the opposing party an opportunity to be heard with respect to the proposed relief. The fundamental purpose of the requirement that allegations of a complaint must provide the measure of recovery is to prevent surprise to the defendant.[3]
[1] Diona v. Balangue, G.R. No. 173559, January 17, 2013.
[2] 569 Phil. 137 (2008).
[3] Id. at 144.