If you are not a software shop you really would like to outsource those risks.
Hence, they pay the capital cost to get a fixed, known deliverable.
Developing new software is hard and risky. Sure, if you can get the right team for the job it can work out wonderfully but this just creates another level of risk - you need to find the right developers.