Perhaps it's illegal to imprison people who have committed no crime, on the guess that because they were interacting with people who had a disease, they might have it too.
Also, in this case and many like it, imprisoning this man would have been much more expensive than simply testing him for the disease.
There you go; one reason it's a bad idea to imprison someone you think might be carrying ebola is that you can just test their blood and know for sure if they are. Seems a lot cheaper and better all round than imprisoning people.