This very good pic of yours helps tell a story.
The brass all metal bottom bypass valve can conduct heat easier then an all plastic bypass valve. But that is only part of the issue as it alone is not the issue.
Mainah's point about a possible leak through the bottom valve leaking, or the top and bottom valve, made me think even harder if that could cause the problem. And then Jim's comment about a siphon going on.
They are really good thoughts but I'm not thinking they are the issue. Those laws of physics tell us, there has to be a pressure difference (pressure drop) of some level between the upstream source and the downstream area of flow in order for a liquid or gas to flow.
The heater just sitting there with no faucet open or the system is not leaking water out somewhere else, there is not a pressure difference across those valves to allow flow. The pressure is equal in the entire system. With no flow the hot water in the heater cannot flow backwards into the cold water line on the bottom.
But... heat can travel by convection
through an object that can conduct heat. The brass valve and the water itself in the valve can transfer heat given enough time with cold water on one side and hot water on the other side.
In this case it takes temperature (more is faster) at certain time (long time) to create enough heat convection to heat up the cold water sitting in the cold water pipes just before the cold water enters the brass bypass valve. That pocket of hot water once heated then travels up and down the cold water pipe with cooler water ahead and behind it.
Once the faucet is opened, the hot water pocket heated in the cold water piping then comes out the faucet and can be scalding as it can be whatever the water heater is. Even if the water heater is working at 140F like it is supposed to, that is hot scalding water. It can get worse scalding and happen faster if the heater is overheating the 140F.
If you want to prove out this concept, fill the system with cool water, turn on the water heater and let it sit and cook all day long, even over night if you want to. Measure or carefully feel the gray cold water pipe by the brass bypass valve at the start of the experiment and then about every hour thereafter and record the info.
If the gray cold water pipe starts heating up that feeds the brass bottom bypass valve, then you know the heat convection concept is going on. This same heat convection is occurring on the top hot water piping too just we do not notice it as we expect hot to come out. Even the white bypass hose will heat some given enough time. The piping closer to the heater will be hotter then further downstream. And over time, it too will change to become hotter up to the point of equilibrium with the water heater as time passes.
This blast of hot I'm assuming will only happen once when the water heater has been on a long time (hours worth) and it's the first time you opened a cold water faucet. Once the blast is over, you can open and close the cold many times in a short time period (less than an hour) and the issue not happen. A leaking bypass valve would create the issue all the time.
Using the infrared gun Mainah was talking about will work good for shooting temps on the brass valve and piping. It can also be used on tires, brake drums, bearings and even your frying pan temperature or the roast under your grill hood, LP gas level in the tanks and other things around the camper. Harbor Freight has one and a web search can find other cheaper ones too. They are not as accurate as really expensive ones but are good enough for a camper setting.
The only way to stop the heat convection practically is to change the time factor and or the water temperature difference in the water heater. If you turn the water heater off for long periods of time of non use, then the water cools down in the heater and cannot convect as much heat as fast. The higher the temperature difference between hot and cold the faster the heat convection process occurs.
What ever you try, please report back. Curious on this one if I concluded the problem correctly.
Hope this helps