Code issues when selling home are common, and sellers complain they are stuck paying for improvements they never needed. The goal of having city certification required on home sales is to retain a certain quality in the community and to record and provide a minimum level of safety for everyone.
Take the electrical outlets as an example. You changed them from two prong plugs to 3-prong grounded receptacles, nice and convenient for you. However, if you did not connect them to a legal ground they are not properly grounded. This is a safety hazard.
Say, someone is cleaning your carpets with a steam cleaner and their machine malfunctions. They could get shocked, possibly blown right out of their shoes. You will be at fault because you gave them a grounded plug that was not properly grounded. Sure, the carpet guy could have used a ground adapter, (which does not create a ground) but they would have known they eliminated grounding to their machine. Now it would be their fault because it was their choice to use the adapter.
How about having to install a Ground-Fault-Circuit-Interrupter (GFCI) within six-feet of a faucet? A GFCI is an electrical safety device that installs without a lot of hassle. They do not have to be grounded in older homes and they work fine without it. This device will stop the flow of current if any electricity is missing, such as the user is getting a shock.
But safety violations must be addressed in any community if it is to maintain property values. Building codes are to protect you in the one in one millionth chance of something going wrong. Many of the directors that establish building codes are insurance people. It is no wonder they are forcing us to be protected from even the smallest danger.