I would say it has to do with energy/information conservation laws. You can imagine a wave (be it electromagnetic or vibrations on a string) is propagating through a medium. The energy of such a wave is given by:
1. Classical harmonic oscillator (pendulum or vibrating string) $$ U = \frac{1}{2}kx^2 $$ where $x$ is displacement from the steady-state rest position and $k$ is some constant (spring constant) which tends to pull the system back towards the steady-state equilibrium. The frequency of oscillation here is $$f= \frac{1}{T}= \frac{1}{2\pi}\sqrt{\frac{k}{m}} $$ where $T$ is the period and $m$ the mass of the oscillator (mass of unit length of a string if you like). So you can see that the energy stored in the system is given by $$U=\frac{m}{2}(2\pi f)^2 x^2$$ So it is clear that if we assume absence of loss or gain, the frequency has to stay constant as the wave travels on the string otherwise we are gaining or loosing energy.
2. Quantum mechanical harmonic oscillator (electromagnetic waves - photons) $$ E = hf$$ where $h$ is the plank constant. Again energy depends on the frequency and must be constant in the absence of local sources or sinks.
Now in case of transmission/reflection at an interface, it might help to think of the rope as a series of equally spaced balls, connected with mass-less springs/ropes i.e. 795
something like $$-\cdot-\cdot-\cdot-$$ For an interface in case of a rope we can think of a thin piece of rope attached to a thick piece of rope. $$-\cdot-\cdot-\cdot-\odot-\odot-\odot-$$
Energy travels through this rope assembly via "nearest-neighbour" interactions. So say a pulse is traveling from left to right, for the 3rd ball to start to move, 1st ball has to transfer energy to the 2nd and so forth. We can think of frequency as a rate of oscillation (jiggling). The large ball sitting at the interface can't start jiggling until the little ball to it's left jiggles, and these jiggles arrive at a constant rate of $f$ per second and are passed on.
Now while the wave travels at a different velocity in the 2nd medium (by that I mean the pattern) the jiggles are transferred between individual balls at a constant rate, otherwise the flow of information will break down. This manifests in a change of wavelength in the 2nd medium. $$f= \frac{v_p}{\lambda}$$ where $v_p$ is the phase velocity (speed of wave pattern propagation) and $\lambda$ the wavelength. To keep $f$ constant, if $v_p$ increases, so should $\lambda$ and vise versa. 453