It was so that Legendre could do with the gamma function what the Catholic church did 170 years later:  He put a simple pole at the origin.