Re: How does that work?
Root CA certificates have a much longer expiration date. They are also kept much more secure (i.e. they only directly sign intermediate certificates and (should) be kept offline or in secure hardware so they are much harder to compromise).
The idea is that the TLS libraries used by software (e.g. web browser, curl, wget, etc) to interact with a TLS endpoint includes long lived Root CA certificates in its trust store. Because it is much harder to update the trust store for all of the installations everywhere if there is a compromise, an Intermediate CA certificate is used to actually sign the final certificate. That Intermediate CA certificate has a shorter expiration (ten years is on the higher side, and twenty years is actually insane). If the Intermediate CA certificate gets compromised, it can be revoked much easier, as it's not typically part of a TLS library's trust store. The TLS library only trusts the Intermediate CA certificate because it's signed by a Root CA certificate, which it directly trusts.
This is where the concept of a "certificate chain" is used. If we take a web server as an example, it will typically provide the site certificate and any intermediate certificates used to trace it back to the Root CA certificate. The browser will look at each certificate in the chain, and if the final one is signed by a certificate it trusts, it considers the site certificate trusted. If an intermediate certificate is compromised (which is very rare), it can be revoked. The device is supposed to use the CRL to verify whether a certificate is revoked. How well this works in practice, I'm not sure.
The big takeaway is that certificates must have some sort of expiration. The regular certificates are short lived (anywhere from three months to one year nowadays) because they're easy to replace. The Intermediate CA certificates are trusted longer (but not so long that a compromise would let a vulnerability linger for a long time). The Root CA certificate is trusted even longer (because it would involve updating millions or even billions of devices). Because of its importance, the Root CA certificate is very heavily protected. If that is ever compromised, you will probably not be a CA anymore.