Were you on the Big blind ?
On the flop you had 2 weak overs and an inside draw.
The chances of hitting an 8 by the river is about 16% and not 30%.
I would haev folded on the flop.
However if you believed your 2 overs are good as well then you have 10 outs which is a bit less the 40%, which makes sense to call
You had no reaon in hell to call the turn bet of $9