In some cases, neither divorce nor legal separation is necessary to break legal marital ties between a couple. An annulment declares a marriage was not valid to begin with and treats it, legally, as if it had never happened.
Not just anyone in California can get an annulment. There are only certain situations in which they are allowed. These include: if one spouse is found to have already been married at the time he/she married the other spouse (annulment for "bigamy"), if a marriage was between siblings or close relatives (annulment for incest), if the marriage came about by means of fraud/force, if a spouse was under the age of 18 or not of a sound mind when married, or if one spouse has suffered an "incurable physical incapacity."
Also realize that there are statutes of limitations on many of these different grounds for an annulment, and there is much legal paperwork to be filled out and procedural rules to be followed. And an annulment hearing must ultimately be held. Thus, annulments are not "easy" or "automatic;" it takes real legal expertise to navigate the process.