On top of that, designing good looking furniture takes much more skill and time. Sometimes ya just don't have the knack either.
That being said, it's still super satisfying to make furniture, even if it gets cracks from expansion, has all kinds of weird defects, or doesn't look all that great!
IKEA stuff may not last centuries, but it often lasts fine for its intended use. I have a number of cheap IKEA Kallax-style bookshelves around my house. They're made of cardboard, hopes, and dreams, but have held up to all the loads I've thrown at them for years and even survived a couple of apartment/house moves (admittedly, the big one would probably not survive another move). How many people ACTUALLY want to keep the same piece of furniture with the same dimensions and styling forever? How many people who want to actually manage to in the face of new residences, combining furniture with roommates/partners, etc.?
IKEA is only one example. The same arguments apply for other brands, including some "real" furniture. I'm in the middle of building a queen-sized Murphy Bed. All said and done, my material costs are approaching $2000 (without a mattress) and I've spent several weeks worth of evenings on it. It's been a challenging project, and I don't regret it, but economically it would ABSOLUTELY have been better to buy one.
This is not at all a common or majority opinion among the fine woodworking community. There certainly are advantages to engineered wood products, but the shortcomings of wood as an organic material (it moves with respect to humidity, regardless of what you coat it with) can be overcome through successful furniture design.
Also, IKEA is not the comparison for my DIY projects. I compare quite favorably in cost to Thomas Moser, West Elm, etc.
For things like the railing the original poster mentioned, that really falls under home improvement. For those things which are generally site built by a carpenter, you can absolutely save money even factoring in a few tools.