It's not illegal to issue shares. It is however illegal to issue them for personal gain as opposed to the company's benefit. You must not have followed the Tyco mess.
For those who understand no explanation is needed, ...For those who don't none will.