Many times, the criminal is doing something wrong in their field - for instance, a doctor with a practice and he/she over bills Medicare for treatments he/she may not be doing. Therefore, having an agent who was a nurse or a doctor will help in understanding what treatments were being billed and not done on the patient. Or the agent may be an accountant, and that agent then looks at banking statements to figure out where the money went.
So FBI agents have various background that are specialized, psychology, chemistry, engineering and the like. But they all train to catch the bad guys. They just sometimes do it differently than the police. I hope this helps you on your journey to a career. Best wishes.