The code is part of a standard, used-almost-everywhere library, `date`. Code in these libraries, from what I undersand, have a ton of thought behind them. It might follow that there were good real-life use-cases ready to use the code that influenced its presence in that library?
Also: https://github.com/search?l=Ruby&q=Date.today.saturday%3F&ty...