Maybe I can help, with a simple analogy.
Say you own an older house. When it was built it met the building codes of that time, but things have since moved on and it's current electrical system would not meet code now. But the current wiring is grandfathered
You are allowed say to change socket and switch plates, because these are decorative features that have no impact on the system.
But then you decide to upgrade the kitchen and want more sockets. This change puts you over the threshold for the number of allowable changes, thus you are required to upgrade the whole of your house electrics to current standards.
Now you have to install a new fuse board, new wires to each switch and socket in each room. BUT. Because you're cutting into the stud walls, you have to replace those parts, except you've changed enough of the walls, so other codes require you to replace the whole wall with newer flame retardant wood which leads you into having all the internal walls replaced.
So your minor kitchen upgrade turns into a whole house renovation and that's without the addition costs of defects you uncover (with these additional works) which have also to be repaired and meet the current codes.
You wish you hadn't started and the wife, kids and dog hate you.