The sibling comment is correct, but to be a little more specific, when a carrier transmits a call into the phone system, one of the metadata fields in that transaction is the Caller ID of the calling party. It may sound asinine, but the infrastructure we've built for the PSTN basically requires it.
If you're interested in what's being done about it and the history of how it got this way, the STIR/SHAKEN wiki article has good details: https://en.wikipedia.org/wiki/STIR/SHAKEN
If you're interested in what's being done about it and the history of how it got this way, the STIR/SHAKEN wiki article has good details: https://en.wikipedia.org/wiki/STIR/SHAKEN