You're right that we just experienced a heat wave that broke several daily and monthly temperature records. But this was a high pressure ridging event without much accompanying wind or thunderstorm activity. So the wildfire risk wasn't forecasted to be notably extreme, until today when the red flag warning sets in. But before you pick on that, the red flag warning is due to offshore winds, which would blow any fire and smoke away from the area these folks were hiking. The early August heatwave, in contrast, was accompanied by a decaying tropical storm had flung upper-level instability over California, causing the lightning storms you mentioned. On paper, the early August heat wave was much more dangerous. This was just a classic late-season heatwave, which usually makes for very enjoyable conditions in the high country.
On top of that, the area where these folks were planning to hike is in alpine terrain that's relatively light in tree and vegetation cover. The likelihood of the fire consuming them was extremely low. The main hazard would be smoke from a fire nearby, which is what happened. Additionally, wilderness permits for this area are very competitive, so they had to plan this trip 6 months ago and had no ability to change the time or location of the trip.
If it's your goal to assume as little risk as possible, you're right that you probably shouldn't go backpacking (or engage in any other outdoor pursuit). You probably also shouldn't be living in California. But for most people, it's a balancing act of risk versus reward, and there's not really any evidence to suggest that these folks made a foolish or dangerous decision.
Remember, hindsight is always 20/20 and it's very easy to criticize the decisions of others from the comfort of your armchair. If you'd like to do some more of that, there are many hundreds of thousands of Californians (myself included) who also headed up into the Sierra this weekend.