although as far as I know that in itself is not illegal or unlawful
Without knowing all the details and not wishing to comment on the particular case, if true it could be construed that it brought the company into disrepute and was Gross Misconduct and therefore a sackable (though not criminal) act.