The reason is damage cant go below 1, so with 50% damage reduction mass baby towers is better than upgrading at lest for the grenade towers.
Lets look at the Grenade tower you got 1 damage for 7 AKA 1:7 damage per mineral and 3 for 20 damage per mineral. Correct for 50% damage reduction in very hard and you get 1 for 7 and 1.5 rounded up to 2 for 20 or 1:10 damage per mineral now it don't take an genius to see that massing is better giving you 43% more dps per mineral spent. And for the last upgrade it gives 9:57 for 1:6.3dam per mineral or with reduction its 5:57 or 1:12 damage per mineral. So you can see that upgrading grenade tower on hardest diff is just a big fat no no.
For Ray towers it turns out that upgrading is just ahead giving a tiny increase in damage per mineral of 5%.
A simple fix to the problem at lest for the grenade tower is to double all damage and HPs.