It may seem arbitrary, but California courts have set a length that defines what they call a "marriage of long duration." California Family Code Section 4336 outlines that the court retains indefinite jurisdiction over spousal support for a marriage of long duration unless the parties agree or the court orders that support is terminated. There is also a rebuttable presumption that a marriage lasting ten years is a marriage of long duration.
In practice, this means that if your marriage lasts ten years, the court will typically retain jurisdiction over spousal support indefinitely, and unless you show the court that the parties are self-sufficient and not in need of support, your spouse could receive support from you for the rest of your lives. However, if you marriage lasts less than ten years, the court will typically only award spousal support for a duration that is half the length of the marriage. So, an eight year marriage would likely result in four years of spousal support, whereas a ten year marriage can create indefinite spousal support. Thus, this small difference in the length of your marriage can have a huge effect on your wallet.