This is the Eco 101 way of thinking about it. Reality is more complicated, and more advanced economics models reality closer. Basically put, what you are describing is whats called a Perfect Market. A Perfect Market is one in which there are no barriers to enter or leave the market as a producer or consumer. However the vast majority of markets are not like this.
For example, the sheer complexity and amount of money needed to start a new NAND factory is itself a giant barrier to entry. Most markets that have a high barrier of entry take on a market structure called an Oligopoly. An Oligopoly is when there are only a few producers in the market, and it is difficult to enter the market. The difficulty need not be because of anything nefarious from the producers, it might only be because the production process is complex and/or requires a lot of technical expertise.
In Oligopoly markets, because there are only a few producers, the producers have more leverage over their buyers and are therefore able to charge prices higher than the marginal cost of production.
To your suggesstion, lets say I realize this and I want to start a NAND factory that undercuts my competitors by a little bit but leave me plenty of profit, I have to first build a factory large enough to reach the economy of scales that my competitors have. Reason for that is for a period of time, the marginal cost of production decreases as sheer production increases because the process gets more streamlined and automated. However to do that I need to hire engineers who know how to make a NAND, and maybe I need permission from the Chinese communist party. Then I need to get a bank to agree to give me a loan so I can have enough money to build my factory and hire my engineers. Banks probably are not going to be too keen on lending an unknown quantity and will likely charge me a higher interest rate to compensate for that risk. Only then can I enter the market.
So as you can see while its not impossible to enter the market, its not easy either. Since thats the case, the few existing producers can, without any nefarious activity (which is not to say there isn't any, but its not required), charge prices higher than the marginal cost of production.