Why a statute was needed at all. A will has to be executed with formalities, signed and witnessed, and the ordinary consequence is that a document lacking those formalities cannot control who takes property at death. A revocable living trust is exactly such a document, and worse, it is one the testator can rewrite the day after signing the will, or that can be amended after the testator has died. The statute's own wording tells you what the objection was, because it disclaims it in terms: the devise "is not invalid because the trust is amendable or revocable or because the trust was amended after the execution of the will or the testator's death."
What the enacted text actually permits. Under Montana's version, a will may validly devise property to the trustee of a trust "established or to be established" during the testator's lifetime by the testator, by the testator and another person, or by another person, "including a funded or unfunded life insurance trust, although the settlor has reserved any or all rights of ownership of the insurance contracts". It may also devise to the trustee of a trust brought into being at the testator's death by the will's own devise, "if the trust is identified in the testator's will and its terms are set forth in a written instrument, other than a will, executed before, concurrently with, or after the execution of the testator's will ... regardless of the existence, size, or character of the corpus of the trust." Both routes contemplate a trust holding nothing at all during the testator's life: the first says so by naming an "unfunded life insurance trust" as a permitted destination, the second by that closing phrase about the corpus, and the section as a whole reaches a trust "to be established". An empty trust plus a pour-over will is a valid, if minimal, arrangement.
The failure mode the statute states and almost nobody quotes. Montana's subsection (3): "unless the testator's will provides otherwise, a revocation or termination of the trust before the testator's death causes the devise to lapse." California's enactment says the same at subsection (c). So a testator who revokes the living trust and does not replace the will has a will whose main gift has failed, and the property falls to whatever the will provides in the alternative or, failing that, to the intestacy statute. Revoking a trust is a two-document act.
State variation here is real and checkable, which is worth knowing because "state law varies" is usually said and rarely demonstrated. California's enactment requires the trust instrument to have been executed "before, concurrently with, or within 60 days after" the execution of the will. Montana's has no such window and accepts an instrument executed "before, concurrently with, or after". Two enacting states, two different rules, on the same question about the same model act.
What a pour-over will does not do. It is a will, so everything it catches runs through probate on the way to the trust, with the delay, the expense and the public filing that involves. It preserves the trust's terms for that property and not the trust's probate avoidance. A plan that relies on it to do real work has simply moved the funding problem downstream. It is also still an ordinary will in every other respect, which is why it remains necessary even for a fully funded trust: it is the document that nominates the personal representative and, in most states, the document in which a parent records who should raise a minor child. Those functions have nothing to do with pouring over.
The relationship to a testamentary trust, which the statutes settle by name. Property poured over into an existing trust "is not held under a testamentary trust of the testator but it becomes a part of the trust to which it is devised", and is administered under that trust's governing instrument including amendments made after the testator's death. So the two instruments are opposites: a testamentary trust is created by the will and governed by it, while poured-over property leaves the will's control entirely on arrival.