The ESTA approval is no guarantee for an entry into the USA. Many tourists may not be aware of that but if you travel with ESTA, you have no right whatsoever to enter the US. The final decision is made by the immigration officer and there are officers...and officers. Smiley 
That's the case for everybody even people with Green Cards. They can deny you entry at will and then you need to go through an Immigration lawyer (assuming you are GC holder and want to go home).
Dealing with US immigration is always tricky just because the power of granting entry lies with the individual immigration officer.
 
Btw to take you to the separate room is not unusual but it is an inconvenience because that means that you will miss connecting flights etc...The important thing is to stay calm and not panick. If you do panick they will keep you there for longer...