You're correct that the thesis is already a requirement. The 5th year is fully funded by Yale (you get paid), and many students take it as an opportunity for a more relaxed year before jumping into residency, while at the same time improving their residency applications, especially for competitive specialties. I've talked with 2 students about it and heard that research is very much ingrained in the culture at Yale, so I assume either a) Yale tends to draw students very interested in research, and/or b) bandwagon effect/being immersed in that culture lends itself towards more people opting for a research year.
Definitely not a requirement and completely optional, but sounds like many students see it as a chance to do research with the incredible faculty at Yale, while getting paid and relaxing a bit before residency.