I am limited my answer to the United States, because that is what I know about.
Many state consumer protection laws specifically prohibit this practice as a "deceptive trade practice". See, e.g., Colorado Revised Statutes § 6-1-105(1). Some of the pertinent paragraphs of this subsection include the following descriptions of conduct which constitutes a deceptive trade practice:
(i) Advertises goods, services, or property with intent not to sell
them as advertised; . . .
(j) Advertises goods or services with intent not to supply reasonably
expectable public demand, unless the advertisement discloses a
limitation of quantity; . . .
(l) Makes false or misleading statements of fact concerning the price
of goods, services, or property or the reasons for, existence of, or
amounts of price reductions; . . .
(n) Employs “bait and switch” advertising, which is advertising
accompanied by an effort to sell goods, services, or property other
than those advertised or on terms other than those advertised and
which is also accompanied by one or more of the following practices:
(I) Refusal to show the goods or property advertised or to offer the
services advertised; . . .
(IV) Refusal to take orders for the goods, property, or services
advertised for delivery within a reasonable time; . . .
(VI) Accepting a deposit for the goods, property, or services and
subsequently switching the purchase order to higher-priced goods,
property, or services; or
(VII) Failure to make deliveries of the goods, property, or services
within a reasonable time or to make a refund therefor; . . .
(u) Fails to disclose material information concerning goods, services,
or property which information was known at the time of an
advertisement or sale if such failure to disclose such information was
intended to induce the consumer to enter into a transaction[.]
Deceptive trade practices can typically give rise to enforcement actions by the state attorney general seeking injunctive relief or monetary damages or fines or both in the name of the general public, class action lawsuits by classes of persons harmed by the practice, and private lawsuits brought by individual victims of the practice (with minimum statutory damages and attorneys' fees).
But, this conduct wasn't illegal at common law (until a contract was breached through non-performance), and I am not aware of an federal law in the United States that prohibits this practice, although other aspects of the transaction might end up violating federal consumer protection laws which are administered mostly by the United States Fair Trade Commission (FTC) (e.g. if refunds are not provided within the time allowed by law which is usually 30 days).