"It was very important that I learned to lose in those two years. I have become stronger," Rossi added.
"I was focused on the target all year, but Yamaha did a great job with a great bike, the Bridgestone tyres worked very well and I think we deserved the championship.
"It was a great fight this year with Stoner, he was a great rival and very difficult to beat."
Rossi's latest success reinforces his reputation as the greatest motorcyclist of the modern era, and marks a return to top form after a two-year gap without a win, the longest title-free streak of his career.
His first world title in the 125cc class came in 1997 riding an Aprilia, and two years later he was champion of the 250cc category, which earned him a move to Honda in the elite class.
Although it took him nine races to record his first win, he repeated his progress in 125s and 250s by following his a steady debut season with a dominant second campaign.
Rossi won 11 races on his way to his first elite-class title in 2001, the last year of 500cc racing before the competition became MotoGP.
That was the first of three successive world titles for Rossi and Honda, before he decided to join fierce rivals Yamaha.
At the time many people questioned the logic of moving to such an underachieving team, but Rossi silenced his doubters in spectacular style, winning the world title by 47 points.
Rossi's fifth straight elite-class title came in 2005, as he finished a remarkable 147 points ahead of nearest rival Marco Melandri, and he went into the 2006 season as hot favourite for another title.
But it was Hayden who ended up earning the right to wear the number one plate in a remarkable end to the season.
In the penultimate race of the season in Portugal, the American was taken out by team-mate Dani Pedrosa and failed to finish, putting Rossi in the lead with one race to go.
But there was another twist to come, as Rossi crashed, allowing Hayden to snatch the title and end Rossi's winning streak.
In 2007 Rossi had an unhappy season, struggling with his bike and tyres as Stoner ran away with the world title, and doubts grew as to whether Rossi had lost his golden touch or even his motivation.
Rossi made it very clear to Yamaha he was disappointed with the support he received in 2007, and they responded in the best possible way the following year.
Changing to Bridgestone tyres gave him another lift and despite challenges from younger rivals such as Stoner, Jorge Lorenzo and Dani Pedrosa, once again it was Rossi who set the championship pace.
Reigning world champion Stoner was his main rival but seemed to crack under the pressure after Rossi triumphed in a thrilling duel at the Laguna Seca Grand Prix, and from that point on Rossi's championship win began to look increasingly inevitable.
Famed for his post-race celebratory stunts, Rossi celebrated his eighth world title in total with a t-shirt saying "Sorry for the delay", referring to his two-year wait for a win, and also a reference to his recent troubles with the Italian tax authorities over unpaid bills.
Now aged 29, Rossi is under contract to Yamaha for two more years and is showing no sign of quitting just yet.
"I think I have some important goals in the next two years. I'll try to win more for Yamaha," he said.
"I have never had a problem with motivation in my career."
This season he broke fellow countryman Giacomo Agostini's record of 68 top-class race wins, and two more seasons in MotoGP could potentially give him a chance to match Agostini's record of eight premier-class titles.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.