Two things to remember: First, business entities are formed under state law in the US, not federal law. So, when a company incorporates it must choose the law of one of the 50 states. Second, not all businesses choose Delaware law, but yes, Delaware is very popular. In fact, so many public companies are incorporated under Delaware law you might have gotten the impression that all business entities are formed under Delaware law.
Why do companies choose Delaware law? Delaware has a reputation for making it easy to form a company and offering flexibility with respect to the rules of the company (e.g.,shareholders do not have to hold meetings).
In addition, Delaware is well-known and generally respected for its business law. Delaware has a special court called a Court of Chancery that deals with business litigation. The Chancery Court does not have juries. Instead, judges issue written decisions. Attorneys reading these decisions have greater confidence in their understanding of Delaware law and their ability to predict the outcome of a dispute.
But attorneys in the United States who specialize in forming companies will check applicable laws and will select the state of incorporation best-suited for their clients.