Hi CFC --
Yep, at first glance the needlefish is odd. But there are some factors at work. For a start, their overall shape is ancestral. Needlefish evolved to live in the upper level of the open sea, where a narrow, streamlined shape is both efficient for escaping larger predators and has a smaller silhouette that makes them more difficult to see. Their ancestors are the halfbeaks, which have the exact same shape, and yet feed partly or mostly on plankton and plant matter (seagrass fragments).
The narrow beak of a gar or needlefish operates differently to, say, a pike cichlid. Narrow jaws are designed for a sideways lunge, and the idea is that being narrow (flattened from top to bottom) presents the least surface to the water, reducing drag, allowing them to move their head sideways very rapidly. A pike or pike cichlid is totally different. The jaw opens and producing suction that draws in the prey, normally coupled with a forwards lunge by the fish. Pike and pike cichlids both have a concentration of fins at the back (dorsal, anal, and tail) that create a large "springboard" that propells them forwards. So if you watch a gar feed compared with a pike, it's different. One sideways, the other forwards.
I've watched gar in the wild, and they eat everything, not just fish. They are VERY common in mangroves in Florida, where they eat crabs and large shrimp. The alligator gar, for example, feeds primarily on blue crabs when in brackish water. Gar teeth are actually very robust and crunch up shells just fine. Perhaps not perfectly evolved for the job, but their design works fine. They continually grow new ones to replace any that get lost.
Re: crusteaceans. It's important to remember that the species we see in fish shops aren't the ones that are common in the wild. If you go night fishing anywhere in the tropics, the water column is ALIVE with swimming crusteaceans of all types, mostly fairly small shrimps such as mysids (which live in freshwater as well as the sea). I can easily imagine needlefish feeding on these at dusk and dawn. They have the right shape, and swimming crustaceans have weak shells (to reduce weight) and present no more difficulty than the bones in small fish. So yes, I agree, these fish probably wouldn't eat crabs or crayfish, but they could easily eat nektonic crustaceans.
Cheers,
Neale