One does not simply learn big code base, especially in case it is not documented.
It is vital to maintain consistent architecture
I am working on a certain project for two years, I still do not understand it one bit;
I know your feeling. I have struggled with big and old code-bases, too.
in case of this project I am working on, I think that it is the fault of the developers who worked on it before me because they did not maintain architecture of the project nor did they document it or even care about it, they just wanted to fix bugs quickly and go home
In a way it is nobody's "fault". There were many developers during the years working on the project. They all had to implement features dictated by their boss and customers. They also struggled to understand the existing code. This situation inevitably leads to copy/pasted code and poor architechture.
Over the years it will be more and more difficult to fix the design. It would require massive refactoring which affects all parts of the code and potentially create new bugs. It is understandable that the management does not want to do it. The current code works, customers ask for more features, the money comes from customers...
The decision is easy: let's implement the features instead of breaking the code with refactoring which brings no immediate value for customers.
BTW, I guess you do the same thing that the previous developers did. You also add features by copy/pasting code instead of fixing the project's architechture, don't you?
I hope that current Lazarus developers have some guy who is in charge who makes sure that all changes made by others are consistent and do not break existing architecture or over-complicate it
There is a group of guys doing that. In practice the people who have commit access to Lazarus sources, are in charge.
This project is already so big that nobody knows all its code. Fortunately some of the core developers are extremely clever and the design choices have been mostly good. Sure there are also some dark corners that nobody knows well.
Open source development has a benefit over commercial development in this matter. Developers can concentrate on architecture and design if they feel so, without pressure from marketing or management.