First, it is not unconstitutional for the U.S. government to recognize a corporation created by private parties within the District of Columbia, where it has the legislative jurisdiction of a state, as a variety of common law trust, and even to grant it a monopoly on the use of its name. That is not "creation" unless the government is one of the incorporators..
Second, it is not unconstitutional for the U.S. government to enter into a contract with a private bank to receive, hold, and disburse public funds. There is a problem if the contract is not the result of competitive bidding. There is also a potential problem if bank officials exercise governmental functions that are not under a chain of command leading up to an elected official. Executive powers may be delegated but not without supervision of their exercise by the executive branch and the courts.
Third, it would be unconstitutional to forbid a corporation incorporated in one state or territory from conducting business operations in another state or territory, subject only to reasonable regulations or taxes that do not discriminate against out-of-state entities. So the National Bank was certainly within its rights to conduct business in Maryland, and be treated there like a Maryland bank.
Fourth, it would be unconstitutional for Maryland to tax that part of the National Bank that involves the handling of public funds, but not the part that is entirely private. Maryland could reasonably require the Bank to keep accurate books that keep the two sides of its business separated and separately subject to taxation or regulation.
The decision should have been that Maryland may tax the National Bank on its private business on the same basis as it would a Maryland bank, but not on its public business.
All the dictum about "necessary" being merely "convenient" and everything else not needed to reach the above decision should have been omitted.
Read James Madison's notes regarding his objections to Marshall's opinion in McCulloch:
. . . reasoning of Supreme Ct — founded on erroneous views & — 1. as to the ratification of Const: by people if meant people collectively & not by States. 2. imputing concurrence of those formerly opposed to change of opinion, instead of precedents superseding opinion. 3. endeavoring to retain right of Court to pronounce on the consty of law after making Legisl omnipotent as to the expediency of means. 4. expounding power of Congs — as if no other Sovereignty existed in the States supplemental to the enumerated powers of Congs — 5. making the Jud'y — exclusive expositor of the Constitutionality of laws: the co-ordinate authorities Legisl — & Execut — being equally expositors within the scope of their functions.James Madison, Detached Memoranda, reprinted in Writings at 756.
See also:
- What is the limiting principle? — Exploration of question raised by Justice Kennedy in oral arguments.
- Unnecessary and Improper — Analysis of Necessary and Proper Clause.
- The original meaning of "carrying into execution" — The restrictive phrase has never been properly adjudicated.
- Supreme Court decisions on Commerce and the Necessary and Proper Clause — Spreadsheet of cases showing the chain of deviation from original understanding.
- Clarifying Amendments — In the form of a bill.
- U.S. Constitution annotated — We will be adding links to diagrams from this copy.
- Commentaries on the Constitution of the United States, Book III Chapter 24, Joseph Story (1833) — Discusses the clause, but in a way that exhibits the infection from McCulloch v. Maryland.
- Diagram of the Necessary and Proper Clause — Parsing helps understanding.