People say that modern airliners are more resilient to turbulence, but I see that a 707 and a 787 still have the same G-rating. Why is this?
Note that the 2.5 g limit is for load due to manoeuvring, not only for turbulence. The certification specification for large aircraft on the subject of turbulence and gusts has changed several times since the certification of the Boeing 707.
Turbulence, and its effects on aircraft, is nowadays much better understood. Different aircraft react differently to the same turbulence. What will result in a high g-load in one aircraft, may be a moderate g-load in another. Therefore the certification regulations now focus on prescribing the type of turbulence that needs to be safely dealt with, instead of the resulting load factor.
In 1964, a formula was introduced describing the gust load that the structure aircraft has to deal with. This was added as FAR 25.341. This section has subsequently been updated in 1990, 1996 and 2015.

Modified from my earlier answer to a related question