He could have used that time to farm his jungle but chose instead to try to gank for you. The attempt failed so he took some minions so he doesn't fall too far behind in levels and gold, otherwise he'll become uselss and be unable to gank for anyone.
From: Stalky24 | #006 wow I never did this as jungler, I can do that?
Because now Im gonna.
Don't It screws over lanes worse than the lack of exp would screw over the jungler since it pushes the lane and makes you have to choose between farming at the opponent's tower with heavy risk of getting ganked or waiting for the lane to even itself out.
Every time a jungler does this to me I just farm his jungle until it evens out
It really depends, junglers like J4 should tax since they need all the help they can get. If you just ganked and got no kill and both your lane member and opponent B. Just push the wave all the way to the turret.
Sometimes if my mid is staying I just go back to my jungle and farm more without touching minions.