When you're a start-up starting out to build your product, nobody knows what your product or the market will look like in two years, let alone in 10. YTOu might not exist in 2 years if the product isn't a hit, so there' no point in investing in robust codebase if you'll be broke by then.
Very, VERY few companies starting out have the luxury of having secured the funding, customers and the knowledge of knowing upfront what the future will look like in order to plan well from the start.
>Pretty much the entire attitude you espouse in your second paragraph.
It's not my mentality, I'm just telling you what the real world mentality is of those who pony up the cash. Then again, I'm in Europe, where VCs don't throw billions of ZIRP money at SW engineers, so nobody here values your "code quality" but your ability to push something out the door fast and cheap to multiply their investment ASAP.
Furthermore, the art of the trade is not "pretty code"; it's a design and implementation that can last decades and not require a rewrite to accommodate new feature demands. There is a balance to be struck between business interests and legitimate engineering concerns around technical debt. And as we've gotten more of these MBA wunderkinds at software companies, the balance has swung very far toward the "Just get it out the door, engineers are just spoiled brats who are never happy with anything" end of the pendulum. Pretty much the entire attitude you espouse in your second paragraph.
You're not wrong that it's not the engineer's dime in terms of money. But it's also not the manager's dime on the technical debt credit card. Engineers have to make the trash solutions forced by their management work and scale for years. That doesn't show up on a quarterly report, but that doesn't mean it's free.