In a nutshell: people trained with American accents made calls to American taxpayers suggesting that they owed backtaxes and would be sued if they didn't pay up.
Didn't you think you were calling a government office? They aren't exactly known for their customer service, whereas scammers are known for having a slick feel to their operation. Interesting that that was your tip off.
You probably would have figured it out as soon as they told you that you could settle your IRS debt with iTunes gift cards.