Seol mar théacs é seo: On the formation of dwarf galaxies and stellar haloes