Small craft is hard to hit and easy to mask with jamming systems, so if you have good ECM and decent engines, they make sense.
A battleship needs more energy to change it's vector of movement and is a bigger target for manual aiming, while fighter can quickly change speed and direction of it's flight.
Also, consider that the longer the warship is, the more limited is it's turning due to G forces experienced at the farthest point of a ship. A fighter can turn quickly, because it's pilot would be not far from it's center of mass, so G forces would be smaller. GTD Raynor's crew close to forward beam cannon would experience about 10G when turning at 11dps, while fighters can turn much faster (I'm giving you the values for Raynor, because I calculated them only for it). Also, fighter pilot can be in seated position all the time, when warship's crew may need to stand up sometimes (for example to path up damage), which further limits manouverability (not many people can stand when a ship is pulling 4G). Not to mention fighters can enter atmosphere, which extends their usefullness.