By looking at the URL, and determining what it (and other urls on that same site) starts with and determining the commonality between them. Then drop the http:// or https:// and BOOM...you've got the entry.
Because you've entered it directly via the source method - works fine, and isn't controlled by that setting. But you're not going to be allowing everyone to use source mode, are you? So then you need to allow people to post certain urls...and that is what the setting is for. You then need to provide them with a method in the editor (ie a custom button) to allow them to use iframes.
What exactly are you trying to achieve here, as I've a feeling this is going to go around in circles very soon. The above information has been covered a few times on here, and a search for 'iframe' should pull up any other informaton you need.