most countries blackouts are not actually proper blackouts of a whole country or region.
nor is it that mining is causing a national 'shortage' of electric
they are actually neighbourhood blackouts/brownouts caused by people using excessive energy in neighbourhood circuits thats are not designed to supply that much power to any one building
in short those syphoning free electric from the grid do so by bypassing some of the electric circuitry.
causing neighbourhood sub-stations to circuit break
other people found guilty of illicit mining are doing it by setting up asics in their place of work or in abandoned buildings without the employers/building owners consent, and without paying for the electric used
hardly any of the cases are where some national law is just blanket banning mining
yep bitcoin mining is LEGAL..
yet if you mine by syphoning electric or trespassing or interfering with the national grid substations/circuit breakers then expect to get shut down