It's not that terribly unusual when you realize the sheer number of possible compounds you can actually make with 17 carbon atoms and change. It's certainly a number you'd need scientific notation to write out. And curiously enough,
Wikipedia has 2 more drugs that have that same formula. There's actually a strong opioid called hydromorphinol (or oxymorphol - generated from the reduction of the ketone on oxymorphone), that has the same formula, as well as some B2-adrenergic bronchodialator compound called fenoterol.
Scopolamine and cocaine are closer in structure than you'd think though. They have all the same "bits" roughly, but have them arranged in different places. Both have a phenyl ring, an ester group, a tropane ring, etc. - goes to show that even a small change in structure can produce wildly different effects. Or for an even more simple demonstration, the mirror image of DXO, the active dissociative compound that is generated in your liver when taking DXM, is a compound known as levorphanol, and is actually a very powerful opioid painkiller. Both molecules have the same formula, and technically have the same structure from one point of view. However, the two drugs are like your left and right hand - mirror images of each other that cannot be overlaid exactly even if you rotate them.
One thing to note in chemistry is that the empirical formulas are not very good for describing drug structures. For that, people tend to use the line-drawing "skeletal" formulas, due to their high information density and easy readability, instead of exclusively text based abbreviations or anything else. Empirical formulaeI] are [/I]useful for figuring out the molecular weight quickly though. But in the end, the arrangement of atoms in space plays a much greater role than just what atoms you have exclusively.