FORTUNE -- Pandora's Tim Westergren took a somewhat meandering path to starting what amounts to the world's largest radio station. The 44-year-old executive spent much of the 1990s as a struggling musician. During a gig at a Palo Alto Holiday Inn in the late 1990s he found himself playing piano in front of a big-screen television broadcasting the latest football scores. Adding to the indignity, a football fan approached "and asks me to stop playing for a moment, so he can hear the scores," Westergren says. "He can read them, but he wants to hear them." After collecting his free hamburger from the hotel kitchen later that night, Westergren gave up the hotel gig, and began thinking about other musical options.
If you are one of Pandora's 21 million monthly users, you may have a loutish sports nut to thank for the service.
Years before Apple (AAPL, Fortune 500) launched the iTunes music store with its Genius recommendation feature, Westergren figured there was a business opportunity in using technology to help music fans discover new artists. He developed something called the Music Genome Project to analyze music for similar traits and in 2000 launched Pandora, which lets users customize stations around bands they enjoy. Say you're a fan of the Grateful Dead. Pandora will play songs from Jerry Garcia's solo catalogue, the Band, and Phish, artists who have similar subtle characteristics, or "genes," such as vocal style and melodies.
The free service was an instant hit with consumers, and eventually Pandora became a model partner for the embattled music industry, electronics makers (some of which embed the Pandora application on their devices), and even would-be competitors like Amazon (AMZN, Fortune 500), which also recommend music. Even Apple CEO Steve Jobs has shown Pandora some love. Westergren says he and his team were among Jobs' chosen few to present their iPhone apps at an Apple event in April. "We help them sell phones," Westergren says. "They like that."
Pandora expands its reach through such relationships. "Putting the service on every device is how Pandora is going to go from tens of millions of listeners to hundreds of millions," he predicts.
Pandora, which posted its first profitable quarter late last year, gets most of its revenue ($50 million last year, Westergren says) from video, audio, and graphic advertisements. (An ad-free premium service costs $36 a year.) "Pandora has shown that you can monetize new listening models," says Mitch Bainwol, head of the Recording Industry Association of America.
Musicians, who can be prickly about online distribution of their wares, are Pandora fans too, in part because they get paid every time a song gets played. (Last year the company gave $30 million back in royalties to performers and publishers.) And since Pandora's approach to serving up tunes doesn't use popularity as a criterion, every composition in the catalogue, whether it's recorded by an unsigned band or by a major-label artist, has an equal chance of getting played and finding an audience.
That kind of musical meritocracy is perhaps the biggest part of why Westergren started Pandora. He wanted a way for people to discover the legion of unsigned musicians he was a part of in the '90s. In 1994 his band, YellowWood Junction (a Robert Frost poem reference), was named, somewhat ignominiously, "most promising unsigned band" by a San Francisco radio station.
"There were some great bands, but they were only known to the people who saw them play live," says Westergren, recalling his touring days. "I remember thinking, 'If only these bands could get some kind of exposure.'"
In other words, if only there had been Pandora back in Westergren's Holiday Inn lounge-playing, YellowWood Junction days, things might have been different. "We could have been big," Westergren says, laughing. "We could have been so big."