Are you referring to plumbed in systems fitted to vehicles or the portables used trackside?
A summary of the different requirements for different MSA & FIA motor events is on this manufacturers site:
http://www.lifeline-fire.co.uk/extinguisher/regulations.htmFor many years halon was the main installed extinguishing agent in motorsport as it was very effective in small quantities (thus saving on weight and space), penetrated and flooded the engine compartments easily, had a quick knockdown, and was non damaging. However halon was found to have an extremely high ozone depleting potential & thus became subject to various legislation around the world. Voluntary phasing out started in the 90's, however motorsport held onto it's use for quite a while due to the trouble of finding a suitable replacement. It is now illegal in the UK (with some very few exceptions)
AFFF & more recently "clean agent" has become the replacement agent. Powder is normally prohibited for in car use. As to why AFFF, ask the MSA. But AFFF cools the fire well, will not cause vision problems, allows partial extinction as oppose to "all or nothing" and in fine spray/mist is reasonably quick on shallow fires.
Trackside in the UK a dual agent approach is used. Dry Powder (ideally Monnex or at least Purple K, but generally due to cost normal ABC Powder is often used) extinguishers are used for initial attack to ensure rapid knockdown to prevent spread and protect the driver. This is followed up by AFFF which will cool hot metal and seal any spilt fuel to prevent re-ignition. Most of the rest of the world just uses powder. A high standard of training is required as poor use of extinguishers trackside has had horrendous rsults over the years and I have several clips in my library illustrating the fact