The mass-loss process in dwarf galaxies from 3D hydrodynamical simulations: the role of dark matter and starbursts