Why are barrel adjusters different for brakes and gears? In my experience, the ones for brakes will look something like this

while ones for gears will look like this



Is it even true that this is the case or did I just randomly see all the bikes having this configuration? If this is the case, what is the reason for this difference?
The top one is to be threadded into a brake lever where the first flexible housing starts. This one is for a smaller hole size.  There are similar ones which have chunkier threads too, and they're not interchangeable.  Smaller ones again are found on older style caliper brakes right on the arm of the brake body.

Your second photo is for the downtube stops - where the first piece of flex housing ends.  It has serrated edges to hold against vibration, and a small spring to stop the round grip from rattling.  You may also find these directly on the rear derailleur, and very rarely on a front derailleur.

So short answer, they're for different locations on the bike, for different wire-driven systems.

Brakes have to cope with higher forces than gears.  This is why the brake inner is thicker than the gear inner cable.  So an adjuster for brakes has to resist those braking forces and has a lock or jam nut to hold position once set. 

Brakes also sweep a range from relaxed to taut so it has a lot more "analogue" usage.

The gears need to position on one of 5~13 positions accurately, so by comparison its a more indexed or "digital" position.   Friction gears didn't use adjusters like these because the adjustment is in the rider's fingers.

As such, the gear adjuster needs to be more "dialable" and there are even people who will adjust their gears while riding, so on the downtube is more accessible than the rear mech.