why leasors capitalize the lease as investment?

as far as I know, investing activities are that firms PAY money to buy fix assets, but leasors EARN money from the leasee, is it also investment?

I think because they own the asset and take rent expense/lease payments from leassee. All money that Leasor spends on buying assets/PPE should be Investing for them.