The step here that is illegal is the moment company 1 takes out a high interest loan from company 2.
Company 1's directors have to do what is in the best interests of the company. If they choose to sign up to a high interest loan which will take all their profits, that isn't decision-making in the best interests of company 1. That's the point they can be put in prison.
I just don't quite understand how nobody is prosecuting them...