I think you missed it doesn't have weapon resistance like every other demon save the dretch - even the lowly quasit has it. I'm thinking the lack of resistance may be a typo, if so, it still has low HP for its CR, but its not a complete pushover. Its only immunity is to poison, which is at the low end of what you want immunity to as a monster vs pc's.
No, I did not miss it. For purposes of determining CR it does not matter. The barlgura already has 3 other resistances. That coupled with its immunity to poison is enough to double its effective hit points. The resistance to bludgeoning, piercing, and slashing damage is only for non-magical weapon attacks anyway. So that can be negated depending on what the party has. Depending on the level of the party, 68 hp with the elemental resistances will be more than enough to keep it up for two to three rounds.
The barlgura seems like it is a decent CR5 monster. It can cast invisibility on itself before combat, run up to the level 5 wizard who has 22hp-32hp and have a reasonable chance of knocking it out in the first round (or the cleric if it has weak looking armor). Suddenly the party is down 1/4 of its power in the first round. The fighter attacks and surges for another 2 attacks. With a +6 to hit (maybe a +7) 3 of those attacks hit for 24 damage. The rogue attacks with two attacks, and hits with both and does 20 damage. The cleric uses healing word or a potion to get the wizard back in the fight and avoid coup de grace. The barlgura has 24hp remaining.
Round two, the barlgura uses reckless and attacks the wizard and then the rogue, the wizard goes back down, the rogue takes 20 damage. The fighter hits with both attacks for 17 damage and the rogue finishes it off.
This was just a basic white room scenario with average to hit used instead of rolling. The scenario could have gone lots of different directions. This is just one possibility. The fight lasted 2 to 3 rounds, which is normal for a medium encounter. The barlgura provided low to medium risk for the party, which one would expect from a medium encounter. Medium encounters should not be too difficult and cause a small expenditure of resources. The party used an action surge and 2 potions or level 1 healing spells, and it is down roughly 40 hp. They could have skipped the action surge and probably still finished it off in two rounds. The end result in resources would still be about the same.
If the wizard had not gone down, it probably would not have blown a fireball on a single creature. If it had, the average damage would be 14 from resistance, and 7 if it made its saving throw. Magic missile averages 10. 2 of 3 scorching ray bolts would hit for 14 or 7 damage. So even if the wizard didn't go down first, it would have to be more creative to contribute to the fight. It seems like this guy's job is to negate the wizard's effectiveness.
The 68 hp looks low, but is plenty to survive 2-3 rounds. It will probably be on the low end of that, maybe even 1-2 rounds, but it will do plenty of damage in that encounter. Which is where the balance comes in. A CR5 generic monster made just from the cheat sheet table generally lasts 3 rounds, but it takes longer to do its damage. If you look at the monsters in the MM, most have less hp than what the table suggests. In each case, it is because of higher damage, AC, resistances, immunity, ranged flyer, or something else. But each of them has a reason for it, and most of them would last 2 to 3 rounds as a solo against a 4 character party of the same level as its CR.