The roots are indeed the same (see, eg. the form מורה used in Samuel 1:20:36 and Chronicles 2:15:3).
It's not unusual for roots to have multiple senses, and on the simplest level that's what we have: one means to shoot [arrows] and one means to teach. See the two different roots on Hebrew Wiktionary. (We can speculate if these derive from two different roots in ancient Hebrew with different Reish's or something like that.)
On the homiletic plane, consider Malbim's comments to Exodus 15:4:
ופעל ירה בא על המשליך חץ ממקום רחוק בכח, וכן על המשליך דבר מלמעלה למטה ממקום גבוה אל מקום עמוק מאד שנופל בכח גדול ע"י כח הכובד
The root Y.R.H. comes on throwing an arrow from a far place forcibly, and similarly on throwing something from above to below from a high place to a very deep place that it falls with a large force by way of the force of [gravity]. (my translation)
Teaching is passing information from an intellectually high place to an intellectually lower place. As was the Torah itself passed from 'heavens above' to 'our lowly world'. Thus the root becomes very appropriate in this context. (Consider also the implications for Genesis 46:28.)
Strong derives 'teaching' as an extension of 'directing [the finger]' such as in Proverbs 6:13.