Nitrifying Bacteria Facts
They are largely non-motile and must colonize a surface (gravel, sand, synthetic biomedia, etc.) for optimum growth. They secrete a sticky slime matrix which they use to attach themselves.
Nitrifying bacteria are photosensitive, especially to blue and ultraviolet light. After they have colonized a surface this light poses no problem.
https://www.algone.com/nitrifying-bacteria-and-the-breakdown-of-organic-waste-in-the-aquarium
Transforming ammonia to nitrite, and nitrite to nitrates. Nitrifying bacteria settle on rocks, gravel, filter media, sand, bio-wheels, etc.
aquarium substrate
though the aforementioned points are very important, perhaps the most important function served by aquarium gravel is providing a bed in which colonies of beneficial bacteria can multiply. Nitrifying bacteria in the home aquarium break down toxins like ammonia into nitrites then nitrates, a process referred to as the nitrogen cycle. While these bacteria may inhabit your tank filter, as well as some tank surfaces, the substrate is where they are most heavily concentrated.
If you ask me, 95% of a tank surface is the tank substrate and walls(glass panels)
5% or less is the filter. (Except perhaps a fluidised bed)
That's how a basic sponge filter is capable of maintaining a tank, or, just an air stone.
Take your filter and put it on a new tank. Problems.
Take your well established tank and put a new filter on it.......less problems. I must have around 100 set ups under my belt, maybe more over the years......it soon adds up if you change things about, I've probably done 20 or so in the last 3 years......all without loss directly associated to poor water quality.
There are of course, many other sites basically promoting the same idea.
I will not link them all........
But to answer your question, I figured it out by years of reading, of the setting up and moving of tanks many many times and changing various aspects of each set up as I moved around. Obviously testing things to ensure the welfare of my pets. My findings basically agree with the above, your substrate is the key component, if it's properly employed you can create anaerobic conditions, enough even to show considerable nitrate reduction.