It's actually a pricing model for options, not shares (which is what stock markets trade). But either way, the reason compounding may be taken as continuous is because prices respond to supply and demand very rapidly. Suppose in the split-second $dt$ the price takes to update, it multiplies by $1+r dt$. Then in a time $t$, this becomes $(1+r dt)^{t/dt}\approx e^{rt}$ (for backward rates, just change the sign of $r$).