In TA, new ship modules allow you to add HP to your ships. For Iconians, this HP add-on can be so efficient that they outweight any possible benefit of defenses in the early to mid game. Even for other Civs, the HP add-on module significantly changes the attack-def valuation ratio.
If you can get a Small Ship up to about 26 HP, then you don't need to negate all damage from an enemy fleet to prevail. You only need to ameliorate as much damage as is necessary not to deplete that 26 HP before you deplete their fleet attack, though the question of whether you should add more defenses or more HP is always a tricky problem.
Too, it isn't always true that you want a Z/X ship where you have enough defense X and fill the rest with attack. Sometimes, it's a lot more efficient to prioritize AI targeting on one or two ships in your fleet with something like a Fleet Bubble module, then fill that particular ship with defenses with only token weapons. Prioritization means that AIs will target that ship preferentially, leaving you to fill out the rest of your fleet with attack ships that have no defenses whatsoever, and it won't matter.