Why would turning on/off hot water when the toilet is flushing cause the tankless pressure relief valve to release water?
Whenever a valve opens and closes, it causes a pressure spike.  This is because water is incompressible, so it tends to telegraph pressure spikes a long distance.  

Water has mass.  When you open a valve, the water has to start to move.  That causes a local low pressure area which of course is what makes the water move.    

When you close a valve, a significant mass of water (in the pipe) is moving toward the open valve. The water at the valve must stop, but the water behind it is still moving toward it.  So it is compressed. All the water's kinetic energy is converted to pressure, in a millisecond. The water moving toward the open valve seeks any possible outlet for the kinetic energy. 

It finds the pressure relief valve in the water heater.  

If it hadn't found that, it could break a pipe.  

A related problem is when it finds an expansion tank on the other side of the water heater, or some comparable "place for the pressure to go". Thus the pressure is relieved by water moving through the water heater.   The tankless sees this water movement, and turns on.  

In a city water system, the obvious place this pressure can go is back out to the street - where it can be absorbed by the massive city water piping.  This is rendered impossible if a check valve (aka backflow preventer) is added to the system.  

An expansion tank is designed to create an outlet for such energy.