For isolated territories or islands, Militia are often the only option.
They are also an option for controlled minor powers and the CCP who have recruitement rolls, as they can choose 1 Infantry or 2 Militia. Depending on the situation, the Infantry is not always the obvious choice.
They are best when paired with other units, as they can soak up the hits while your other units can hope to survive and have better defense rolls. It also helps if they are in a city.
You will sometimes get lucky and take our one or two attacking units with militia, but even in great numbers, they can be easily wiped out by a dedicated attacker.
In small numbers, they mostly serve as a deterrent to the free capture of the territory or half-hearted amphibious landings. Litteraly “better than nothing”.
Still, once in a while, it is very satisfying to take out a SNLF and foil an amphibious assault with a single militia.
Note that there are A LOT of rules and exceptions for building and moving militia. They are very easy to overlook.