It's a side effect of either poor planning or execution. It is not an indicator of training or learning anything useful.
Also, don't confuse a bonk with just digging too hard too long in a power zone. That you can still get home from, assuming you execute nutrition correctly and are trained for the overall event distance and back off the intensity.
I was stupid and attacked twice in a road race, failed, then got dropped. But I still made it over the line just fine at SS power and middle of pack finish. No bonk, just had to back off the power after getting dropped to make it to the finish.