The holes serve several purposes, among them; weight reduction, material savings, decrease drying time prior to firing, decreased firing time due to less mass and improved heat flow to the core for even heating while firing.

Secondary advantages, although much less significant, better bonding and some say insulation value.

I personally question both of the last two. It your mortar join fails with the holes filled, those holes would not have prevented the failure. The are also much better ways to add insulation value.

The holes are for manufacturing efficiency.