The boring answer is that in physics a year is just defined as the time it takes for the Earth to orbit the sun, they don't care about calendars and leap years
I don't think that is what Wikipedia says. Whatever one's thoughts on Wikipedia, I'm pretty sure it is getting this right.
365.25 is what you get if you have leap years every four years with no exceptions. This is what was done in the Julian calendar which was used in the Christian world some centuries ago (how long exactly depends on what part of the Christian world).
365.2425 is the average year length in the Gregorian calendar which we use (where leap years are 1592, 1596, 1600, 1604, 1608, ... 1692, 1696, 1704, 1708, ..., 1792, 1796, 1704, 1708, ..., 1892, 1896, 1904, 1908, ... 1992, 1996, 2000, 2004, 2008, ..., 2092, 2096, 2104, 2108, ...).
The actual average solar year is better approximated by the latter than the former, but it is still slightly off.
As defined by the International Astronomical Union (IAU), the light-year is the product of the Julian year (365.25 days, as opposed to the 365.2425-day Gregorian year or the 365.24219-day Tropical year that both approximate) and the speed of light (299792458 m/s).
That is pretty much what I said. I was irritated by your wording "the actual 365.2425", which is just another approximation of the "actual" solar year.
They skip leap years every now and then. And then skip the skip. Etc. The rotation of the earth around the sun and the spin of the earth on its axis simply don't line up into a nice number.
Oh okay. Yeah I only have that rule of "every 4 years" in my head. I did some other programming exercise way back where we had some other rule, but I was thinking that it would end up being the same.