Good point. I think it might be an oversight.
If it's not an oversight, it may be because Lucario has a lower attack stat than Machamp, so Machamp will still have higher attacking power / DPS in raids. However, yes, Lucario's steel typing will allow it to resist normal moves and take only neutral damage from psychic moves. This'll make it a better attacker into gyms than Machamp and a bulkier attacker into normal-type raids.