Some metals, such as untreated aluminium, require a primer; others may not. A primer designed for metal is still highly recommended if a part is to be exposed to moisture. Once water seeps through to the bare metal, oxidation will begin (plain steel will simply rust). Metal primers might contain additional materials to protect against corrosion, such as sacrificial zinc.
Metal hydroxides/oxides do not provide a solid surface for the paint to adhere to, and paint will come off in large flakes. Using a primer will provide extra insurance against such a scenario. An additional reason for using a primer on metal could be the poor condition of the surface. A steel part can be rusty, for example. Of course, the best solution is to thoroughly clean the metal, but when this is not a viable option, special kinds of primers can be used that chemically convert rust to the solid metal salts. And even though such surface is still lacking in comparison to the shiny clean metal, it is yet much better than weak, porous rust.
Painting and gluing aluminum is especially important in the aircraft industry, which uses toxic zinc chromate primers and chromating to add the necessary adhesion properties.