I'm not sure where you read that, but people who say that are routinely debunked:
1) Almost everyone's pH changes, sometimes dramatically, when they do a water change. It's unavoidable since pH will change between water changes and in fact changes every 24 hour cycle. Just bringing a fish home will often subject it to a large pH swing. If huge pH changes harmed fish, it would be commonly known by the millions of people who do water changes.
2) Published experiments have been done (using multiple species of fish) testing reactions to being moved from one pH level to another that's dramatically different (e.g., differences of 9 to 6, or 5.5 to 8.5) and fish weren't harmed. Even instantaneous changes do not harm fish.
3) Innumerable species have been found to have the ability to live in a wide ranges of pH (from as low as 4.5 to as high as over 10) without being harmed.
4) Otoh, I've not seen a single study where healthy fish were taken from one pH level and placed into another one, where any harm was shown to have been been given to the fish. This would of course be a remarkably easy and inexpensive test. Companies that make products that adjust pH would certainly want people to believe their product would genuinely fix a serious problem. So, why no studies?
5) This myth likely comes from the fact that fish sometimes die after a large water change because the owner forgot to dechlorinate the water properly or introduced some inadvertent poison into the water (e.g., hand lotion or skin cream.) They then are told (without evidence) that "pH changes" led to the deaths. This is then repeated over and over as if it's true.
The cause of an otherwise uninjured fish dying is (in most cases) largely conjecture without an autopsy. Were it only so that we could determine cause of death sans any evidence whatsoever.
Different pH levels will affect eggs and fry, and perhaps inhibit breeding. It can inhibit BB and perhaps affect diseases or healing. It may even have long term health effects. But juvenile to adult fish rarely if ever seem to be affected by "sudden" pH swings in any range (5-9) that an aquarium would normally be found.