Why do light(photons) have no mass

Their rest mass has to be zero or it would be infinite at their speed, which of course is the speed of light :)

mass = rest mass/sqrt(1-beta^2)
where beta = v/c
if v is c, then the denominator approaches zero and if there is finite rest mass the fraction --->oo