It seems like tjethe RegionUpdater Class is responsible for this. Check this file: https://github.com/magento/magento2/blob/077584c99ebb8007cad176c3b9a0144a05c259cd/lib/web/mage/adminhtml/form.js#L81
I don't know how this actually loaded in the frontend. (Haven't played with the new frontend architechure of Magento 2 yet). But what I did is searched for "country_id" which is the name of the dropdown field in the Magento 2 repo on github and filtered on javascript. From there you can see which files have to do with this functionality. Just follow the lead and search for key elements like classnames, function names and html element id's, classes or names.