Lots and lots of ways to do that. Machining tiny things is the opposite of me (I machine HUGE things - oil and gas parts and stuff) but looking at the pic, my guess is they're stamped out, probably in a couple of operations. Or you could cut from sheet (water jet or laser) and then finished. Or extruded and cut off to length. Or you load a lot of them onto a pallet and machine hundreds in one go on a full sized mill (very quick to to do in aluminium). Or die cast. Or sintered perhaps... I'd be interested what someone who makes small things thinks.
It pretty much depends on numbers as to the most cost effective way to do it.