1. What caused this and how to repair it?
Mavericks and permissions issues. Network drive functionality with Mavericks seems to have major problems.
I strongly recommend a full factory reset of the AE.
Set it up again with all names comply to SMB network standards.. SMB is windows standard networking. Since Mavericks Apple now uses SMB as default networking protocol. I do not know why.. and the move does seem to be strange.. but there you go.
So .. good names.. AEgen6 as base station name. AEwifi as wireless name. Make sure the disk share name is simple like data ..
Keep to short, no spaces and pure alphanumeric.
I also strongly recommend the following changes.
Set ipv6 to link local only .. this is default in the AE.. but check that it is.
In the computer force the connection to link-local on wireless and ethernet (if you use it).
ipv6 settings are now vital to the network.
Next manually mount the disk using AFP not SMB.
So in Finder use the top menu, Go.. Connect to server.
Type in AFP://AEgen6.local (Where AEgen6 is your new short name, replace with the name you use and local is default domain, which you won't have changed because you cannot. )
OR even better.
If the AE is router or fixed IP..
Use AFP://10.0.1.1 (replace with the actual IP.. this is default).
You can only do this with static IP.
Finder will search for network resources and come back with a request for password for disk access.. type that in and save in the keychain.
Try to also use computer share name that complies with SMB networking.. and all passwords should be pure alphanumeric. Don't use other characters.
2. How can I avoid this from happening again?
The above is how to get it working.. but also to avoid it happening again.
BUT I do not expect perfect results. You may occasionally still run into permissions issues. Look up fixing permissions with Mavericks.. there are a number of sites as the issue is common.
You may find using a sparsebundle or DMG file as a container is better than just plonking files directly on the hard disk. It makes the files difficult to access from another computer on the network however.
You also have backup problems which should not be ignored. Time Machine cannot backup network disks.
3. Is there a correct procedure for removing the USB drive from the Airport Extreme?
The AE has almost no controls.. so there is nothing you can do even if you wanted.
It is always wise to make sure a disk is not spinning.. if it is spinning then it can be transferring files which will be corrupted.
Your hard disk might have a light when spinning.. always wait until it is spun down.. or if that doesn't happen files are not being transferred.. check activity monitor in the computer.