Federal law defines "armor piercing ammunition" in the most idiotic way imaginable.
"Armor piercing ammunition" is a bullet core (without jacketing), complete bullet, or loaded ammunition, which can be used in a handgun, where the bullet and/or core is made of one of the following, or a composite of two or more of the following: tungsten alloys, steel, iron, brass, bronze, beryllium copper, or depleted uranium.
And "armor piercing ammunition is also any complete bullet or loaded ammunition, which can be used in a handgun, where the bullet is an FMJ or TMJ type where the jacket composes 25% or more of the weight of the bullet.
Being able to pierce a bulletproof vest has absolutely nothing to do with it. And the loopholes are pretty ridiculous; titanium alloys and cobalt alloys are about as strong as tool steel, but are legal to make bullets out of. You can also have a JHP bullet with as heavy a jacket as you want ("Punch Bullets," made for hunting, have a miniscule hole drilled in the front so that they're technically JHPs, even though they don't expand one bit). Another loophole is that the bullet or bullet core must be composed entirely of banned substances. M855/SS109 ammo is okay, because the core is part steel and part lead (it's also excluded by name, I believe). And M2 ball is probably also okay, because the core is once again part steel and part lead (there are also no common production pistols in .50 BMG, though there are a few one-offs). The still-available steel-cored Eastern European 5.45x39mm ammo is also, you guessed it, actually part steel and part lead.
That's Federal law, though. PA state law, for instance, defines AP ammo much more logically; any ammunition which can penetrate a level IIa vest. It's perfectly legal to purchase, own, shoot, etc. AP ammo under PA state law. It's only illegal to use or possess AP ammo during the commission of a crime, much like using body armor while committing a crime.