The function of the IRS is to systematically enforce tax laws and collect money owned to the government though taxes. There is nothing in their bylaws or founding principles that allows them to focus on any group that does not become detected under their normal methods of audit. That is the FBI and CIA's function. If the FBI had ordered the information that would have been a different scenario.
Whether you agree with the Tea Party's stances or not, a government agency as powerful as the IRS should not be allowed to discriminate against one group for any reason, let alone politics. It may not be as outrageous as if they targeted black people or Asians, but everyone should be treated the same under the law. There should be no personal bias applied to the tax code or any other law.
First off, the IRS didn't only target Tea Party/conservative groups. It also investigated liberal groups- in fact, the only group that was denied tax exempt status during the period in question was a liberal group. All Tea Party/conservative groups were granted the status.
Second, what the IRS did was just laziness. They basically set up keyword searches to automatically flag groups that used certain keywords in their own description. That's just dumb, and obviously you're going to get in trouble when you get caught doing it (and these days, you're sure to be caught).
Third, think about this logically. Take off your partisan sunglasses for a moment and pretend that you work for the IRS in 2009 and you're one of the people in charge of evaluating tax exempt status (TES) to non-political groups. A group comes along asking for TES. You look over their paperwork and they say things that show that they are anti-government, anti-taxes, strongly dislike the new president and so on- everything about their self description screams that they're definitely not "non-political". Wouldn't it just make sense to take a second look at them before simply granting TES? And not only that, but there's suddenly HUNDREDS of these groups. This is what the IRS faced in 2009.
I'm neither a Democrat nor an Obama fan, but I've seen no evidence (that didn't involve some sort of twisted, partisan "logic" or a wild conspiracy theory) thus far that the IRS explicitly and exclusively targeted Tea Party or Conservative groups for political reasons (especially bearing in mind my first point, above), or that the Obama Administration was involved. Hell, Lois Lerner is a Republican, appointed by George Bush in 2006 to the position. Why would she suddenly collude with a Democratic President to launch an attack her own people? None of it passes the smell test.
However, if evidence is revealed clearly showing that, one way or another, the IRS explicitly went after specific groups for purely ideological/political reasons, then absolutely heads should roll, so to speak.
Given that not all applicants for tax exempt status could be investigated, it was logical to use terms like "tea party" in a name to screen applicants for further scrutiny to determine if they engaged in political activity that would disqualify them from receiving tax exempt status. A determination of wrong doing would require an examination of whether non-political conservative groups were denied such status.