
This was one of my first few jobs, and I applied to it when my previous employer laid us all due to financial problems. I was hired as a software developer with a pretty low salary, but I was happy to have a job at that time.
I was assigned to work on a mix of "legacy", "legacy of legacy", and the "new" codebases. Based on what I saw, I started to wonder if, in Denmark, people at universities learn even simple things like the concept of normalization in designing relational databases??
Basically, we had one legacy-of-legacy system in which the backend (mixed with the frontend) was creating one database per customer (yes, you read it right!!!)
Then, to fix the issues caused by this flawed design, they created a newer solution, in which the system was creating one table per customer (yes, you read it right, again!!!)
And then, they hired a few more people to work with the previous team to fix the issues caused by the lousy design of both solutions.
Finally, they had 3 tightly coupled systems, directly reading from and modifying each other's databases in a way that people had to spend hours fixing all the issues introduced right after each small change. The system was too slow, very expensive to operate, and very difficult to understand which data resides where, even though back then, they didn't even have 1,000 customers!
Later, they fired the Danish CTO and replaced him with a new one in Poland, building a completely new product from scratch with a new team using a different technology stack. This transformation was huge, took them a while to finish, and needed a lot of money. Still, with that horribly un-scalable and un-maintainable digital setup, it was a matter of life and death for the business that was just about to scale. In my opinion they finally did the right thing. Even though they wasted a lot of money, now, with the new setup, they could scale and become one of the largest companies in their domain. (business-wise they were very good and also had strong connections to financially back them up)

