Research and Development and the equipment, factory upgrades to build them, employee training costs a LOT of money.
Companies need to charge higher prices in the beginning to recover those costs.
Electronics, cars, boats....etc....are have to go through tests to make sure they won't burn down consumers homes
or injure them... Those tests and licenses to produce them can run into the millions of dollars.
These tests also have to be conducted for each country that you are going to sell the product in.
that process can take YEARS and if they fail the test, even more money has to be spent to fix the problem
and then they have to pay yet again to conduct the tests again.
Even that lowly mouse and keyboard on your desk has to go through tests which runs into thousands of dollars.
Producing a product for mass market isn't a simple task of just building it and shipping it to stores.
Even movie and videogame makers have to pay agencies to review their wares.. which again, costs a lot of money.