It is illegal to release wild-caught animals back into the wild in Ontario without permission: Wildlife in Captivity

Whether I think not releasing them is justified in cases where an animal has only been in captivity briefly and hasn't been exposed to anything it can't get to in the wild... Would think they would give you permission in those cases anyway though.

I don't personally care to capture adult snakes in the wild unless they're in danger, just because they're used to freedom. That's another matter of varying opinions, lol.