The basic reason is that the winds and supernovae, due to high-mass star formation, drive out the enriched interstellar gas more easily from the shallow gravitational potential wells of dwarf galaxies, preventing the formation of more metal-rich stellar populations.
There is a well-known relationship between the mass of a galaxy and both the metallicities of its stellar populations and its interstellar gas (e.g., Tremonti et al. 2004). The slope of this relationship is in the sense that massive galaxies have the highest metallicity and low-mass dwarf galaxies have the lowest metallicities. The intrinsic scatter in the relationship is only about 25% in the gas metallicity over many orders of magnitude in mass.
The metallicity of the stars is related to the time-average of the metallicity in the gas - because the stars were born at a range of times in the past. The metallicity in the gas reflects the current level of enrichment, which is driven by the rate at which stars are dying but is also heavily influenced by both the outflows of enriched gas from the galaxy and the diluting inflows of pristine primordial gas.
The basic reason that dwarf galaxies end up being metal poor, both in their stellar populations and in their gas is that they cannot hang onto the interstellar gas that they enrich. That is, the outflows, driven by the winds and supernovae of massive stars and by active galactic nuclei, are more easily able to drive out enriched interstellar gas from the shallower gravitational potential wells of dwarf galaxies before it can be turned into more metal-rich stars. See Romano et al. 2023 for direct evidence of these outflows in dwarf galaxies and see Ma et al. (2015) and van Loon et al. (2021) for examples of galactic chemical evolution models featuring hydrodynamic simulations of outflow/inflow that reproduce the mass-metallicity relationship.