Some reasons that building an app is expensive...
A developer is an extremely expensive skill set. A good dev is $150K - $300K a year, loaded cost (salary is only one part of the cost of a person to hire.) And that's if you pay salary, if you pay by the hour for a part time person, that per hour cost skyrockets like any consultant does. And if you think you can get development done cheaper, you are in for a world of hurt. Developers who cost less per hour cost way more overall, and that's why they are so cheap. It's like rocket science or medicine, doing it well simply costs a lot and doing it poorly costs a lot more.
Development is just one of many skill sets needed in software development and, quite frankly, not even remotely the most important one. SAD (systems analysis and design) is the key role behind software development and is even more costly than hiring a good dev because SAD experts are few and far between and in such high demand that none need to work for you, at any cost. So you really have to work hard to find and attract them. SAD is who actually designs the software. Developers are not architects. Dev is tactical, SAD is strategic.
Operations. Apps need to be used, to be run. Neither the dev nor the SAD are the operations experts. They work in the engineering world, operations is the IT world. IT needs to be involved to some degree from day zero to make sure that engineering decisions make sense and take into account operational realities. This isn't a crazy expensive, but is far from nominal.
Business analyst. In most software engineering for any real purpose, you need a ton of information from the business that no non-expert can really give. A SAD can generally cover this, but is too expensive to waste time on this. So BA is the cheaper role used to fill these gaps. BAs analyze the real business need and help to decipher want the business actually wants instead of what they say that they want. Remember, if you aren't a SAD yourself, then it's not realistic that you can turn business knowledge into software knowledge. Everyone thinks that they can, including people with grad degrees and decades in the field, but trust me, it's an illusion.
Debugging and testing. Someone needs to actually test on the software. This isn't a crazy expensive role, but it takes a lot of time.
Resources. Computers, software, frameworks, testing suites. You can do this cheaply, or expensive. The cheaper your people, the more expensive your tools. One of the biggest costs we see is cheap developers making expensive software with insane dependencies that cost more than the software does itself, and could have been avoided with the most insanely entry level SAD or even competent developer, but people tried to cut so many corners that they got totally burned.
Ongoing support. Software has to be maintained to be usable. The better the original product is made, the easier it is to support. Anything you trade up front, you pay for here - often in the system just failing. How much support you need varies a lot, but is a massive cost for any project.
UX. In many cases, you need dedicated designers because no skill set listed above covers this naturally. It's an unrelated skill and is primarily non-technical, but must be part of the tech team. So almost always you have someone dedicated to this, even if just part time.
It all adds up.