You have made a correct point, that one cannot fully trust results one does not understand. But in my experience flaws are usually discovered fairly soon, at least if the result is important enought to deserve close scrutiny. And mathematician's intuition is very good, so that the statements are more often correct than the proofs.
It is true that flaws may be found in the refereeing process, but refereeing is hard, unpaid, almost thankless work, and the responsibility for correctness still rests on the author.
I have found, usually not serious errors, but more often gaps, or insignificant errors, in papers I refereed, but only after months of close checking of every detail, something apparently no other referee had been willing to do before me. The author usually then quickly repairs it.
The problem is when the author says something like: "by the results of [26], we conclude that indeed all cases are dealt with." Then you look at [26] and find it is a 187 page difficult paper, with its own non specific references. Then you either write back and ask for a page reference, and wait another few weeks for an answer, or you just give him the benefit of the doubt and go on, or you could of course reject it for unclarity.
Just as authors make mistakes so do referees, and being anonymous, a referee has much less motivation to spend enormous amounts of valuable time on a paper. I have sometimes enjoyed spending large amounts of time and energy on a paper where someone does something I like and appreciate, but i could tell from the appreciative comments of the editor that my efforts are unusual.
I have often been helped by strong referees in the form of comments that help simplify a proof, or shorten an argument,a nd I also have tried to make comments which improve papers, but sometimes you just get it back with no useful comment, just a decision.
I have also had strict referees insist on our removing large parts of a paper as less interesting, only to have other authors years later reprove and publish precisely the removed parts, as especially interesting.
In many cases ideas and insights are more interesting and rare than correct proofs. Once someone has discovered an interesting, correct phenomenon, there are usually people found fairly quickly with the technical skill to prove it, but not always.