The "extra-legally" part is not at all clear. When this goes to court (and I'm sure it will), the administration's argument will probably go something like this: Congress has authorized the administration to issue visas to people of "exceptional ability in business" -- see 8 U.S.C. § 1153(b)(2), for example. However, Congress did not specify how, exactly, the executive will ascertain that ability. The Trump administration believes that making a one million dollar investment in the U.S. demonstrates evidence of business ability, and is using this as a factor for issuing and prioritizing visas.