They don't appear to be the same drive. They are the same size, etc., but different quality. One is STBV3000100 and the other is ST3000DM001, The bare drive is their top of the line, Barracuda series. Analogy? WDC Blue vs WDC Black.
Those are product numbers but the drive inside the external might still be the same drive. May people have in fact opened up externals and found them to be the same drive as internals.
Also, if there were binning in affect for drives, then the externals should be the getting the higher quality drives because externals have to deal to with physical shocks and higher temps than internals. Therefore, externals would be more expensive. I highly doubt that there is binning for externals though.
The real reason is because of what economist call "price discrimination". Basically, external drive buyers are dumber and less demanding customers. Internal buyers are smarter and more discerning. Therefore, even though the drive inside is exactly the same, you can charge the person buying an internal drive more.
Looking at alibaba, the price of an external enclosure is about $3 without power supply. So the price of an enclosure is not inconsiderable given the retail price. But the demand gap between the internal and external drive consumers is so great that it can bridge that gap. The demand difference must be roughly ~$16-$26.