Shell Company is a corporate entity without active business operations or significant assets. They are often created to avoid taxes and many big companies create shell corporations to avoid taxes without attracting legal actions.
It can’t be asserted that shell corporations are illegal. They are deliberate financial arrangements to avoid taxes. Tax avoidance is not illegal, though it is not desirable.