Here's why:
* Intransitive verbs do not take a direct object. They express a complete thought without needing to act on something.
* Transitive verbs require a direct object to complete their meaning.
In this sentence, "was" describes the state of being of the rainbow. It doesn't act on anything. The word "spectacular" is an adjective describing the rainbow, not an object being acted upon.