Because it's what they had at the time and it's what the astronauts were flying. Only one of the NASA F/A18's is actually a two seater:
The aircraft were obtained from the U.S. Navy between 1984 and 1991.
One has a two-seat cockpit while the others are single-seat aircraft.
NASA research support aircraft are commonly called chase planes and
fill the role of escort aircraft during research missions.
Their main purpose is to keep an eye out for external issues with the carrier. This podcast covers most of the nitty gritty details of that operation.
Chase pilots are in constant radio contact with research pilots and
serve as an "extra set of eyes" to help maintain total flight safety
during specific tests and maneuvers. They monitor certain events for
the research pilot and are an important safety feature on all research
missions.
As for why they have them:
NASA has a long history of using high performance jet trainers to keep the astronauts sharp. Since many of the older generation of shuttle pilots came out of the Navy or were test pilots, choosing former Navy aircraft is only logical. For much of the Apollo era as well as the shuttle era they actually used T-38's for training and keeping the astronauts current. NASA likes high performance, safe, simple jets for astronaut training as there are things you encounter actually flying that you just don't in the simulator.
"It's actually our most important training that we do as astronauts,"
said Terry Virts, who flew as the pilot of STS-130 aboard shuttle
Endeavour. "It’s the one place where we're not in a simulator. It's
real flying and if you make a mistake, you can get hurt or break
something or run out of gas. There are a lot of things that happen
real-world in a T-38 that don't happen in the simulator."
The actual shuttle trainer is a GII that flies with the gear down, full flaps, and thrust reversers to simulate the descent of the shuttle.