Understand that you can configure any modern OS for any arbitrary keyboard layout regardless of what type of keyboard is connected. The keyboard itself has no concept of what is a capital letter and what is a lowercase letter, it’s just buttons. This makes sense, because at the end of the day touch typists don’t really care what is printed on the keycaps. If I want to use Chinese (eg pinyin), Japanese (which is a cluster of layouts), or Dvorak on a US keyboard why should it matter? This can be handled easily in the OS, the keyboard is dumb.
And the concept of uppercase and lowercase as it would apply to a QWERTY layout doesn’t make even make sense for many languages.
When you press the physical caps lock key you’re just sending a number just like the Q key or something. The OS decides what to do with it. I have virtually no use for caps lock personally so it’s a control key. Using it as a dual purpose key for input method switching is not uncommon. More generally another reason for not baking in functionality in the keyboard is provision of accessibility features such as Sticky Keys and Filter Keys.