The times have changed significantly over the past few decades. Maybe in small-town America, where you have a one-stop shop where the Building Official who enforces the building codes also acts as the zoning officer and is expected to handle property maintenance issues, you can say what you are saying. However, in many municipalities across the country, things are a bit different, as you can see from the poll numbers above. Two decades ago, in Pennsylvania cities, I was providing IPMC training to their code enforcement officers who handled property maintenance issues. That was their title. Just like the jurisdictions of East Hartford & Mansfield, Connecticut, hundreds if not thousands of municipalities across the US have adopted the IPMC to address property maintenance issues. Sometimes, the Building Official is responsible in smaller one-stop shop towns, and other times, they have a separate code enforcement department with a Code Enforcement Officer, such as the one in Weston, CT.
You can join organizations such as the American Association of Code Enforcement (AACE), your state-level organization such as the Florida Association of Code Enforcement (FACE), or similarly named organizations in California, Colorado, Alabama, and even Connecticut, just to name a few. Their purpose is to learn property maintenance codes and the state statutes that govern the legal procedures around them. Regardless of what any state adopts, any municipality can adopt the IPMC. You say potato, and I say potato.
But the times continue to change. Many departments are changing their names to Code Compliance and have Code Compliance Officers working for them. The subtle change is to help ease perception. I am also seeing a lot of CC departments going under the police department these days. I even have one municipality where I am the BO (I cover 2), where property maintenance and code compliance are handled by the police officers.
So, at the end of the day, when you work for the Building Department and handle building codes, you are a separate entity from zoning or code enforcement. Maybe you are in charge of many departments like I am. However, these sub-departments have very different responsibilities. Unfortunately, some of the elected officials don't seem to understand it and simply think they are all the same. They are not. So, let's break this down.
Building Department: Handles building codes with a building official, plans examiners, and inspectors who oversee construction projects.
Planning and Zoning: Often, a planner or zoning officer, or both or many of each, will determine what you can build where.
Code Enforcement/Compliance: These folks enforce property maintenance ordinances and often work with the building department when they catch people working without a permit.
Don't confuse code enforcement with building code enforcement. They are different animals. The IBC only defines Building Officials but not Code Enforcement Officers because they are not the same.