First off I have no experience in the US Navy or the military, all the following info is just from reading and talking to aviators.
Pilots as members of the military, generally put in for a specific base, such as NAS Oceana or NAS Key West. As pilots assigned to a specific airframe, you will generally stick with your airframe. It is to be noted for the USN Fighters that you can be universally assigned thanks to the entire fleet being consisted of F/A-18 Variants (Legacy & Rhino initial training does not seem to make a difference). Once you get your base, you get assigned a squadron. The squadron you get seems to be based more upon the needs of the squadron from a personnel wise (X squadron needs X number of Lt's & X number of Cmdr's). Bottom line is everything is done to needs of the Navy.