They are registered as legit companies in their own countries where they aren't breaking any laws. There is no difference between their legality there or the legality here of any 'normal' company.
Simply put, they are legal companies choosing to advertise here. They are not intended for you to purchase anything from them if it's illegal for you to do so in your country.
US supplement companies can advertise here although they sell some products (ephedrine, yohimbe, etc) that are illegal in places like Australia (actually in aust the penalties for yoh and eph are harsher than for steroids). Does that make those companies illegal? Of course not, it just means that people that live in the countries where those products are illegal should not think about purchasing them.