I noticed that this placard has different diving speeds related to altitud. My guess is that those values are a safety speed to prevent going into regions close to Mach 1. I know that the speed of sound is related to temperature. I did some calculation: 260 mph (IAS) is about 525 kts (TAS) @ -56.6ºC which is standard temperature at 40000ft, that's pretty close to the speed of sound. Am I guessing wrong or those limitations have another purpose?
That's correct. The limitations are to stay below the critical Mach Number, and altitude is used because it's easier for the pilot to monitor and reference to than temperature. The numbers are based on the standard atmosphere's temperature profile and I imagine there is some fudge factor or safety margin to allow for normal deviations from ISA.
The chart below is from the P-38 training manual which shows more or less the same thing as your placard in graphic form. The lines become vertical near the top because at about 36000 feet you are in the stratosphere in the mid latitudes and temperature stops decreasing (The Mustang's placard is a bit odd because you would expect the limit speed at 35000 and 40000 ft to be the nearly the same, but there is a 30 mph difference. Not sure why that is).
The P-38 suffered from a lower critical Mach Number than the P-51 (.68 vs .7) limiting its dive speed at 30000 ft to 290 indicated vs 325 for the Mustang (a major combat limitation until dive recovery brakes were developed - until then, P-38s couldn't chase aircraft in power dives because of the pitch control problems when going transonic).