Ran into this years ago shortly after I got my new 2002 Boxster. (And a few months later when I got my new 2002 VW Golf TDi.)
With my Actron OBD2 tool I was able to view among other things speed and the OBD2 speed disagreed with speedo speed. The difference was very close to 5mph. The speedo was 5mph optimistic. IOWs,with 75mph showing the OBD2 speed as 70mph.
I had a Garmin ETREX -- not a NAV unit but something more used by hikers -- and it showed speed -- dervied from GPS -- and its speed agreed with OBD2 speed.
My concern then was what was this doing to the odometer. Were the miles the odometer was showing were these wrong? I did a test drove 200 miles pretty much in a straight line -- west through KS -- and found the car's trip odometer and the Garmin device differed by only 0.2 of a mile. The car's odometer didn't display miles in tenths but it was also showing 200 miles. Two tenths of a mile error over 200 miles is 50 miles in 50,000 which was the new car warranty miles my 2002 Boxster had. I can't even recall now by the error might have been in my favor. Regardless I was not concerned about it.
Once I was satisfied the odometer wasn't affected I learned to live with the fact the speedo was optimistic by 5mph. This was not difficult to live with, adapt to, at all.
My 2002 VW Golf's speedo was optimistic, too, and by ~5mph. I seem to recall my GTO was on the money, as was my Cayman S. My 996 Turbo's speedo was 2mph optimistic.
More recently I have found my 2018 Mini JCW's speedo is ~2mph optimistic while my 2018 Hellcat's speedo is on the money.
Why at least the Boxster and Turbo speedo read optimistic I don't know. I have heard some of the suspected reasons why, and Pedro mentions the one most often offered: "because of German regulations", but like Pedro I have found the speedo in my German cars (Porsche, VW, and Mini) to not always be optimistic and those that are optimistic are not optimistic by the same amount.