Just because Ash interacts with a Pokemon does not mean he has to catch it.
True, but this was a classic setup for a capture.
Antagonistic/scared pokemon gets trapped, Ash takes off and helps/rescues it and thus bonds with the pokemon.
Added that this is a fairly weak pokemon until it evolves and the table is set.
Would not be surprised if this results in a capture in one of the following episodes.