There are many cases where a federal law is passed that includes language that pre-empts state laws that are stronger (or weaker, depending).
Under what authority is this allowed?
There are many cases where a federal law is passed that includes language that pre-empts state laws that are stronger (or weaker, depending).
Under what authority is this allowed?
Under Article VI of the Constitution:
This Constitution, and the Laws of the United States which shall be made in Pursuance thereof; and all Treaties made, or which shall be made, under the Authority of the United States, shall be the supreme Law of the Land; and the Judges in every State shall be bound thereby, any Thing in the Constitution or Laws of any state to the Contrary notwithstanding.
Courts have repeatedly ruled that this sentence does not merely say "federal law governs if it's impossible to obey both state and federal law." Article VI is meant to protect federal policy from state interference. See, for instance, Gibbons v. Odgen, 22 U.S. 1, at 210-211 (1824) (emphasis added):
This opinion has been frequently expressed in this Court, and is founded as well on the nature of the government as on the words of the Constitution. In argument, however, it has been contended that, if a law passed by a State, in the exercise of its acknowledged sovereignty, comes into conflict with a law passed by Congress in pursuance of the Constitution, they affect the subject and each other like equal opposing powers.
But the framers of our Constitution foresaw this state of things, and provided for it by declaring the supremacy not only of itself, but of the laws made in pursuance of it. The nullity of any act inconsistent with the Constitution is produced by the declaration that the Constitution is the supreme law. The appropriate application of that part of the clause which confers the same supremacy on laws and treaties is to such acts of the State Legislatures as do not transcend their powers, but, though enacted in the execution of acknowledged State powers, interfere with, or are contrary to, the laws of Congress made in pursuance of the Constitution or some treaty made under the authority of the United States. In every such case, the act of Congress or the treaty is supreme, and the law of the State, though enacted in the exercise of powers not controverted, must yield to it.
Federal preemption exists to ensure that the topics of regulation that the Constitution delegates to the federal government are under the effective control of the federal government. Regulation is not always restrictive; sometimes, Congress (or a federal regulatory agency) will decide that some actions should be allowed in order to achieve federal objectives. In Gibbons, for instance, Congress set up a licensing scheme for coastal maritime trade. New York had set up a monopoly on steamboat navigation in New York waters. Both laws are acceptable in isolation; New York can pass laws about New York waters, while Congress can pass laws about interstate shipping. But while it was possible to comply with both sets of laws, New York's laws would undermine the federal system of interstate shipping, and so they were preempted.
When preemption comes up in court cases, the power of Congress to preempt is generally not in question (there are some edge cases, like when Congress is directly interfering with internal state operations, but those are edge cases). The question is whether Congress actually intended to preempt state laws. When Congress explicitly says "state laws are preempted," it's easy to figure out that they did mean to preempt them. Otherwise, federal courts look to whether the state laws conflict with the federal laws (in the sense that it's impossible to comply with both), whether the state laws are an obstacle to the full achievement of Congressional objectives, and whether the Congressional regulation is so extensive that it occupies the field, leaving literally no room for states to do anything in the area.
Article VI, Clause 2 of the US Constitution, known as the Supremacy Clause, says
This Constitution, and the Laws of the United States which shall be made in Pursuance thereof; and all Treaties made, or which shall be made, under the Authority of the United States, shall be the supreme Law of the Land; and the Judges in every State shall be bound thereby, any Thing in the Constitution or Laws of any State to the Contrary notwithstanding.
If Congress has the authority to pass a law on a subject, then that is the law of the land. However, Congress may not have authority to pass a particular law, because as the 10th Amendment says, "The powers not delegated to the United States by the Constitution, nor prohibited by it to the States, are reserved to the States respectively, or to the people". Federal laws often have wording that invoke the Commerce Clause (phrases like "in any action affecting interstate commerce"). In 1942, the Commerce Clause was given a much wider range of application due to the Supreme Court decision in Wickard v. Filburn, where a farmer was penalized for growing wheat to feed his animals, in violation of a federal law. His effect on interstate commerce was to reduce the amount of wheat that might be imported interstate, because he didn't have to buy his wheat.
The situation in California is, for the most part, based on what the relevant federal law says, and it's hard to come up with a single principle covering all such CA/USA differences. Environmental laws exist at both levels: federal law is not written to preclude stronger state law, but a state law cannot effectively nullify a federal law. On the other hand, immigration is an inherently federal matter, so a state can't raise or lower the federally-set bar on immigration questions.