This is because metal is a conductor of electricity while rubber is not (rubber is an insulator). Therefore the metal is more amenable to 'ground' the high charge in the lightning than rubber would. This is also why, when lightning strikes metal, it is safely 'grounded' while if it strikes a non-conductor, most occasionally, it explodes into a fire.