Laws, and how they are acted upon, depend on the country in which the zoo is situated. In regards to your second question, confiscated smuggled animals have been confiscated under the laws of that country's government - so if they are placed in a zoo by that government to be kept then that zoo is by definition keeping them legally. In the cases of extremely endangered species then the government of either country may try to repatriate them (an example, using a random species and country, might be Ploughshare Tortoises confiscated in the UK being returned to Madagascar rather than simply placed in a zoo within the UK), but usually the only options are placing the animal in a zoo or destroying it.
However that is a different situation to smuggled animal being kept illegally. In somewhere like Australia it is easy to know if reptiles (in this case) are being held illegally because no exotic reptiles are allowed to be kept by private individuals and permits for native species are easy to obtain. In other countries it is much more difficult to prove where an animal has come from or how legitimately, and that is often where dodgy CITES documents come into play. Some countries will pursue obviously-smuggled animals despite them having been laundered in some way, while other countries (e.g. Japan in the current situation with Galapagos iguanas) will not. In terms of the law in Japan the animals will be "legal" because they have been imported with CITES documents showing they were "captive-bred" - but in terms of the law in Ecuador they clearly are not legal because they have smuggled out of Ecuador. However, Ecuador (or conservation bodies) cannot do anything about those animals if the government (of, in this case, Japan) won't act upon it.
As mentioned by Batto above, all the Ethiopian Mountain Vipers (Bitis parviocula) in captivity are "illegal" as that species has never been exported legally and the ones which came into the USA did so on the same sort of dodgy CITES documents as the Galapagos iguanas have done elsewhere.