This is where the coverage of the topic usually ends in textbooks. To guarantee uniqueness of symbols, the class Symbol keeps a registry of already existing instances. If it does, the system returns the reference to it instead of creating a new one. The registry is essentially a table of symbols hashed by their names. In other words, symbols are cheap to compare but expensive to create.
Creation takes time, and the registry of symbols takes space.
This tradeoff is the key to the full picture of the Symbol vs String trade-off. For such uses, symbols are more efficient. The cost of creating symbols and maintaining their registry may offset the benefit of low-cost comparison.