You're not really taking a financial gamble .
Also I think it's worth mentioning that, software engineers are people who are paid salaries, while farm equipment is not.
A more accurate comparison would be if instead of buying a finished tractor you hired a couple of handymen to come build you one from scratch. It may or may not work at all. It might end up costing you 10x or 20x or more what you would have paid for an off-the-shelf solution (so valuing it at the labor cost is a ridiculous thing to do. Who in the market is going to buy a custom-built tractor at 20x the market rate?)
Because software development did not already fit in the definition of a capitalizable expense, the lawmakers modified the research and development rules to allow it.