So the actuaries in Rome figured that giving 100 hectares to 5% of soldiers who made it to retirement well covered the cost.
You can bet that there were more than a few Crassus types waiting around to “pay cash” for the promised properties.
Settling retired soldiers into relatively new or sparsely populated provinces probably led to money for someone, somewhere, somehow. Having Roman settlement where it can generate produce, meat, wine, and/or tax revenue may have figured into it. If a commander / emperor had a big chunk of territory in his possession, getting the state to pay him for it so he could distribute it piecemeal to some of his former soldiers would make him popular and flush with cash.