All HTTP(S) headers are just data that the server sends over the wire. It's literally just plain text, usually ASCII/UTF-8. The server can send whatever headers (or body) it is configured for in response to whatever request it receives. Although it is common to configure a server to send certain headers with every response, doing so is neither the only option nor necessarily the best.
Sometimes different responses are sent for efficiency reasons, such as not sending headers to browsers so old they won't understand, or serving different HTTP/CSS/JS to different browsers (remember, the headers - like the body - are just data and can be controlled arbitrarily). Sometimes different paths have difference content or security policies. However, servers can be configured to do anything that any other software could do; for a particularly silly example, the server could skip sending any proper HTTP response at all for every 100th request, and just reply with the text of "I'm a little teapot". This would be a bad user experience, but it wouldn't be that hard to configure a server to do it (most web frameworks will automatically send at least the top line, with the response code, but you can avoid that with some effort).
Also, be aware that there's no 1:1 mapping of domain names to servers. A single domain name might be served by many different servers on the back end, with a piece of software sitting at the public address of the domain, terminating TLS, and routing the request to one of many back-end servers. Some of those back-end servers might send HSTS headers with every request, some with none, some on some other condition (probably not "alternating Thursdays", but it could be!).