Anakin’s Lightsaber is Star Wars’ version of Excalibur. Not only in terms of a weapon, but when wielded - accepting that call to adventure, to fulfill your destiny.
And when the time is right - it is no longer useful for the hero, and it is passed on to future generations.