The Alien and Sedition Acts were controversial because of how blatantly political they were.
In short, the Alien and Sedition Acts targeted the friends of, allies of, and the Democratic-Republicans themselves.
They were instituted after the XYZ affair by the Federalist party under John Adams and were instantly use to silence dissent.