konix, you have to realize though that these aliens weren't exactly the top of their species intellectually. While we're never given confirmation, the movie does suggest that they were all lowly workers, on a mining vessel sent to harvest minerals from planets. They were malnourished when they got stuck on earth, and humans did provide for them nourishment, and once they got a taste of catfood they were exploited out of their weaponry and technology. They were pretty much all about survival and that point (which is logical when you're on a foreign planet occupied by billions of other inhabitants) and once they were stripped away from the advantages they once held over humanity they were just like caged animals.
As to why they were confined, I think it's pretty obvious. If an spaceship of aliens landed over earth and we had the means to cage them, that's exactly what we'd do. We're all about segregation and keeping out the unknown from harming us.