Why are math texts usually so compact? I taught a couple years in a secondary school, where teachers are supposed to explain every little step in the simplest but accurate way.
In high school things don't change much. Perhaps the pace is a little faster but still the goal is to be as clear as possible. Teachers are supposed to use pictures, animations and justify every step when solving problems.
In the university things are a lot different. We get exercises every week and solutions are extremely compact. I don't mean to show every little step when computing a determinant of a $3\times 3$ matrix but often one reads "one implication is trivial, one can (easily) see that, it is clear that..." and so on, which makes me personally feel incompetent because most of the times I don't easily see what I'm supposed to. At least in secondary school, it is mandatory to avoid using words such as "trivial, easy" and so on because of that reason. Still, some teachers do it and some believe this to be one of the causes of the spread of anxiety for mathematics, which certainly hinders the learning process even more.
This applies to this platform as well. The style completely changes.
Why is that so? Are compact solutions more elegant? Are mathematicians just lazy?
 A: This is more of a comment than an answer and might be seen as some sort of addendum to J.G.‘s answer.
It is completely correct that in school one is trained to follow algorithms, while in university the focus switches to writing correct algorithms (=proofs). Moreover it is very tempting (if not necessary in the case of research papers for example) to gloss over standard details to get to more interesting stuff.
Yet I feel like using words like trivial, obvious or easy is very bad practice, especially in the context of mathematical education. It unnecessarily makes students feel bad, if they don’t get the detail, sometimes even after hours of staring at it. It always is a triviality at the end, but most of the time it needs that one standard trick, which just isn’t memorized yet.
I don’t understand, why it isn’t more common to give concise sketches of the idea required to prove a result:

*

*by definition says plugging in the definitions will make the result obvious

*by iteratively using lemma X on Y is a pretty concrete recipe

*by strong induction on $n$ gives information about which type of induction hypothesis is needed

et cetera, et cetera. I don’t think this requires that more time and space and most importantly it gives some sort of reality check: If you cannot summarize the triviality in like one sentence, it most likely is not so trivial at all...
A: Levels of clarity/terseness and the accompanying motivations behind them will vary a lot from context to context.

*

*For terse teacher-written solutions to homework, it may just be due to time constraints, with the expectation that if something is unclear you would go ask for help/clarification.

*Sometimes books are written very compactly partly for elegance, but also partly because they are aimed at an audience who are able to fill in the details. (For example, imagine reading a physics textbook that wrote out the details of long division every time they divided two numbers.) For this reason, it can be difficult for newcomers to learn effectively purely from reading a book since they are still learning how to fill in the gaps

*Teachers also have the opportunity to be more clear in person/lecture (faster mode of communication) than in writing (more time/effort needed to write things down formally), and you have the opportunity to directly ask questions when things are not clear. Take advantage of having an expert available by asking them questions even if you think it is a "stupid question."

*Even at high levels of math, everyone appreciates having concrete examples to make abstract concepts more tangible, especially when communicating about research in a niche area to a broader audience. Terseness is not "more acceptable" as math gets more advanced, but the level expected of the audience may be higher.

*The use of "trivial" in pedagogy is not helpful in my opinion. But more generally, it can be a helpful indication that the justification for some claim follows from some simple definition rather than some complicated argument.

A: In school, mathematics lessons largely focus on teaching you how to follow certain algorithms, so it's important to spell out every step well enough each student will get the hang of it. But from the undergraduate level onwards, you're being trained to write proofs for mathematicians. There are two key challenges here: inculcating the right vocabulary, and ensuring a proof's author and reader see the forest for the trees. As I've discussed here, the latter goal often requires concision, some of which makes the reader write half the proof in their head.
Some concision techniques serve both goals simultaneously. For example, "it's trivial" not only keeps the write-up short (partly by leveraging the reader as aforesaid), but also trains the reader to do the same when they write a proof. For example, if I have to use a fact of the form $\sum_{k=1}^na_k=b_n$ in a proof, I'm not going to write out a proof by induction before I move on. What would be the point? If anything, the reader might get lost. "Wait, why do we care again? Wait, what were we working on? Wait, what was it we proved before they're using now?"
Teachers at every level train students to write what they're expected to. In an exam, you show your work so if you make a mistake you can get partial credit. (That's what I was already told, anyway; how you're supposed to work out the answer without some work you might as well write down is a separate issue.) In a paper you're preparing for publication, you keep it short because they don't want to allow you many pages, nor do readers want you to waste their time. If I saw someone waste four lines on a trivial induction proof in a 7-page paper that's trying to teach the mathematics community something new, I'd be gobsmacked. That's four lines that could have gone towards one of the less trivial things that made the paper worthwhile.
Much of this comes down to chunking. Once you've learned how to do something that has several parts, it can become one part in learning to do something else etc. This is as true of writing proofs as it is of executing algorithms. Before you know it, 1,000 pages of secondary school textbooks will feel like the contents of a post card in your mind. So don't sweat what you're struggling with now; you'll be surprised how quickly it all becomes second nature.
Edit at @BCLC's suggestion: the concision I described can be preferable to relegating details to appendices because, whereas certain steps can break the flow even if brief, appendices are reserved for examples that nevertheless cannot be omitted due to being non-obvious.
