its only purpose because its fast to produce they can easily fill up your countries defense. this is only possible if your under attack and have little units to spare, so the militia is kinda a gap closer for the difference of army size in an event of enemy invasion, the quality is of course bad, the militia is more of a desperate move to repel an invasion.
i was not invaded before or at least not yet to truly use the militias worth and use, so there's that.