Is it because the OS itself is compiled for ARMv6?
Yes.
Why...
The same reason the OS is compiled for ARMv6: Because it is intended for use on all models, including the ARMv6 Zeros, etc.
There is probably not much point in using an ARMv7 compiler on an ARMv6 system regardless of the underlying hardware. The system libraries and kernel are ARMv6.
Also worth noting that the version of ARMv6 used is (no expert, but pretty sure), not that much different from ARMv7. When the ARMv7 model came out, some people were eager to prove that using an ARMv7 kernel and OS was faster than using the ARMv6 one, but I do not think that panned out --
which is part of the reason adoption of the ARMv7 distros was lackluster, and more about people having different flavours as options, not performance (many distros already had ARMv7 repos but few have ARMv6; Raspbian was originally a repackaging of Debian ARMv6).
cat /proc/cpuinfo
I see that the processor is an ARMv7 Processor rev 3 (v7l). But I see that the Raspberry Pi website states the Pi 4 comes with an ARMv8 processor. Do you know where there is this discrepancy? – David Sep 20 '20 at 15:44/proc/cpuinfo
reports the 32bit version the processor supports, which is ARMv7. The ARMv8 is 64bit and you need a 64bit kernel to use that and/proc/cpuinfo
will show ARMv8 then. – Goswin von Brederlow Sep 27 '20 at 15:48