You get what you pay for isn't really true. The worst assembled boards I've ever gotten were from a local Belgian assembler, worst PCBs were from some French PCB manufacturing consortium. Paid a massive amount for both, worst quality I've ever seen. They even managed to assemble the components 180° rotated, even though the component wasn't even symmetric in its pad design.
A couple of other aspects that come to mind. Often times the parts are counterfeit or gray market, a manufacture will make a bunch of components for the client, then run off a few more batches to sell themselves.
Not really, volume pricing is very much a thing, both for PCBs and components. A lot of what you're paying for administrative and logistics costs when ordering things in small volume. For example, the prices you see on Farnell, Mouser, Digikey and RS pretty much include their shipping prices. Why do you think you can buy a whole cardboard box of taped 2N3904 BJTs on Aliexpress for the same price as maybe a few hundred of them on Farnell? Farnell you pay for the service.
In the case of PCBs it mostly comes down to a two factors: process setup (design rule check, production tooling, ...) and production method. If you go for the one-off methods you're going to be paying more per board since they're usually more costly in time, but the moment you go to volume production you pay a setup cost once and you can crank out a few thousand boards at minimal price. I can really point out cases where we paid a few hundred bucks of setup costs and then the actual price per board was a few bucks, so a board that initially costed maybe $120 a pop during the prototyping stage (setup cost in other words) went down to a few dollars when we went towards production quantities on subsequent orders. Additionally, in terms of finishing quality I've had better experiences with some of the Chinese suppliers than with European ones for prototyping quantities when stepping away from standard FR-4. Laser cut flex from European suppliers was often delivered with a serrated edge when inspected under the microscope, while the ones from the Chinese suppliers came with a smooth edge, in other words, the Chinese suppliers actually configured their machines properly.
The other thing I suspect leads to many of these cheap modules is surplus. You've probably seen or heard stories about the vast amount of nifty electronic surplus that was available in the US back in the day. Now all the manufacturing is in China so all the surplus is in China. There are still mountains of surplus parts, remainders from production runs, cancelled equipment, goofed orders, used/salvaged components, factory rejects and floor sweepings, you name it. It's likely a bit of all this stuff ends up in various dirt cheap modules and widgets from China. Some of it is quite good quality, others not so much.
Don't forget that manufacturers will probably just buy thing by the reel anyway, even if they only need 20 of them. So surplus is very likely to occur.
So honestly, before you go "it's counterfeit" because of a low price, realise that in Europe and the US you're kind of being ripped off half the time or are paying for the cost of labour. My main recommendation though is to actually call the supplier, or better yet, visit them if you're going to be running any volume production. You can also hire some folks to randomly barge in and do quality inspection if you stipulate it in the contract. The only issue I've ever run into with having boards manufactured in China was the bank transfers taking too long, never any fakes, no dodgy work. But on every occasion we clearly stipulated the material they should use (manufacturer, specific product code and ask for the conformance paperwork) and provided the tolerances we accepted. If you exactly stipulate what you want they'll only cut corners where you're ok with it.