A pillbox by itself is not worth much. A pillbox is, however, a key part of a network of defense.

This really all got mapped out during the First and Second Big Mistakes back in the 20th Century. You have your individual defensive positions (a quick foxhole if you are just going to be here 1-2 nights, a wood covered, protected hole in the ground if you are going to be here a week, concrete pill-boxes like these if you are not in enemy contact and don't expect the battle lines to changes quickly). But each position- no matter what it is made of- has a limited field of view, it can only protect a certain area. So the soldiers have to rely on each other- you build a network of these positions, with overlapping fields of view/fire, and connect them via buried telephone wire to each other and to friendly artillery and reserves and you have a formidable defense network: a machine gun in this pillbox makes all of the attacking infantry hug the ground, while the pill boxes next to it keep the enemy infantry from crawling up in your blind spot and throwing a grenade into your pillbox, and your artillery behind hits the enemy infantry while they are out in the open, crawling along the ground, and then your reserves launch a counter attack and push the enemy infantry back to their start point.

The German solution[1] to this defensive network in World War One was to empower small groups of soldiers to move completely on their own, to find the dead ground where no gun could hit them, then get as deep as possible- looking to cut telephone wires, to attack the enemy artillery and command posts, and let follow-on waves isolate and destroy individual pill-boxes. As part of a network of soldiers the pill-boxes were difficult to defeat. If you could isolate them and turn them into a couple of armed dudes they can be defeated, as you note.

The Germans adopted these tactics en masse for the so called Kaiserschlact- the "Peace Offensives" of 1918 where they tried to knock France and Britain out of the war before the US Army was fully ready to fight. It failed, in part because the infantry moved forward at the rate of march, while the infantry reinforced on defense at the rate of a train, and also once the attackers went over the top they could no longer communicate and coordinate with each other. If they couldn't find any dead zone, if they were caught by enemy artillery, they couldn't get any help from their comrades- then they were just a couple of armed dudes and no longer soldiers part of a larger team. After the war ended, a German named Heinz Guderian looked at that experience and realized if he got a whole bunch of tanks and could put the rest of the army (all the different types- artillery, infantry, anti-tank guns, engineers, etc.) onto vehicles and tie them together with radios he could fix both problems, and boom, you have Blitzkrieg tactics. (He used a different term for it in his book _Achtung, Panzer!_- Blitzkrieg was more of a PR term than a term used by professionals. His word for it was some German word that literally translates to "Attacking every level of the enemy defense simultaneously," which somehow did not catch on the way that Blitzkrieg did.)

[1]: The British and French came up with a different solution, relying more on heavy planning and staff-officer work and not empowering their junior leaders as much, because of industrial (the Germans had ~0 tanks in WW1, the UK/Fr had thousands) and cultural differences between the armies.