It is commonly used to connect:
TV → Soundbar
TV → Home theater system
Game console (PS4/PS5/Xbox) → Audio receiver
DVD/Blu-ray player → Amplifier
Advantages
Clear digital sound with less interference.
Supports surround sound formats such as Dolby Digital.
Easy to install—just plug it into the optical ports on both devices.