I hear you on how frustrating that is. There are several reasons they don't contain solutions. The reasons you have heard are idealistic but practically incorrect. In particular this is wrong, for the reasons you intuited:
> Additionally, I heard the argument that "you should know" if your solutions are correct.
Anyone who believes this has forgotten their own early struggles or never watched beginning students struggle with something comparatively basic, like induction. In fact, introductory (proof-based) math courses are particularly dangerous for not knowing whether or not your proof is sound, because you've not yet built the mathematical maturity to check your own work. In a similar vein, beginning students often have a high level mental model of why a statement is true and which "tools" are needed, but no idea how to concretely put these together in a sound proof.
This is more of an opinion that doesn't reflect reality:
> The common answer I get is solutions "rob" the student of learning.
If the presence of the solution means the student will simply refer to it instead of e.g. completing homework on their own, then the student was probably never really engaged with the material in the first place. It's one thing to laboriously complete the proof first and then use the solution to check it, but it's another thing entirely if the student is just skipping all the work. This is especially true nowadays, because students who want to get easy answers can just go on math.stackexchange for virtually any homework assignment.
These answers are parroted because there is a deep seated "trial by fire" culture in advanced math. But this doesn't have anything to do with why the solutions don't tend to be in the books. To begin with, you have to check your assumptions:
> How can a self-learner without access to a university or professor check their work?
These textbooks are (for better or worse) not designed to be used by self-learners. In fact there isn't really any mainstream publication effort in higher mathematics targeting autodidacts. Therefore that criticism - while valid - isn't really applicable to math textbooks. Ostensibly students are using these textbooks under the instruction of a professional mathematician in a classroom setting.
The other reason mostly follows from the first one. The proof of any given statement is typically significantly longer than the statement itself. As it stands, math textbooks are usually filled with sequences of axioms, definitions, propositions, theorems and lemmas. Each chapter tends to have at least six or so of those sequences, but potentially dozens. The proofs of theorems are included, which means that all but the most trivial of chapter exercises would significantly lengthen the entire enterprise. That's a lot more writing, grammatical editing, mathematical proof-reading, page binding, etc for the whole publication process.