Why does the default Insert/edit link function in Visual mode in posts or pages produce full urls?

Your forgetting the Pages are stored in the Database. The database does not use relative linking. You can control the output by Activating PrettyPermalinks. For moving a domain you must use a Database Backup/Restore Plugin and modify wp-config.php should the database name change