Because the frequency of a sound wave is defined as "the number of waves per second."
If you had a sound source emitting, say, 200 waves per second, and your ear (inside a different medium) received only 150 waves per second, the remaining waves 50 waves per second would have to pile up somewhere — presumably, at the interface between the two media.
After, say, a minute of playing the sound, there would already be 60 × 50 = 3,000 delayed waves piled up at the interface, waiting for their turn to enter the new medium. If you stopped the sound at that point, it would still take 20 more seconds for all those piled-up waves to get into the new medium, at 150 waves per second. Thus, your ear, inside the different medium, would continue to hear the sound for 20 more seconds after it had already stopped.
We don't observe sound piling up at the boundaries of different media like that. (It would be kind of convenient if it did, since we could use such an effect for easy sound recording, without having to bother with microphones and record discs / digital storage. But alas, it just doesn't happen.) Thus, it appears that, in the real world, the frequency of sound doesn't change between media.
Besides, imagine that you switched the media around: now the sound source would be emitting 150 waves per second, inside the "low-frequency" medium, and your ear would receive 200 waves per second inside the "high-frequency" medium. Where would the extra 50 waves per second come from? The future? Or would they just magically appear from nowhere?
All that said, there are physical processes that can change the frequency of sound, or at least introduce some new frequencies. For example, there are materials that can interact with a sound wave and change its shape, distorting it so that an originally pure single-frequency sound wave acquires overtones at higher frequencies.
These are not, however, the same kinds of continuous shifts as you'd observe with wavelength, when moving from one medium to another with a different speed of sound. Rather, the overtones introduced this way are generally multiples (or simple fractions) of the original frequency: you can easily obtain overtones at two or three or four times the original frequency, but not at, say, 1.018 times the original frequency. This is because they're not really changing the rate at which the waves cycle, but rather the shape of each individual wave (which can be viewed as converting some of each original wave into new waves with two/three/etc. times the original frequency).
Let me say what others are trying to say, hopefully in a clearer fashion:
Just because you can relate two variables in an equation does not mean that they are dependant. In this case, you have to constrain intensity $I$ in order to get the relationship. At that point, it is not a general relationship, but only true when $I$ is constrained.
An example that might be easier to see intuitively would be:
$$KE=\frac{1}{2}mv^2$$
If you constrain kinetic energy you can get a relationship between mass and velocity. For example:
$$m=2\frac{KE}{v^2}$$
But intuitively, you know that mass and velocity are independent of one another. Why would changing the mass of an object inherently change the velocity? But, if the kinetic energy is held constant, then it would force a relationship between them. A relationship that is not generally meaningful.
So, to bring this back to your case, $x$ sound amplitude and $w$ angular frequency are independent of each other, but you can force a relationship between them by constraining $I$, but it is not a meaningful or general relationship.
I found a good answer elsewhere that explains it much better than I did here. I would recommend checking it out.
Best Answer
In order for the intensity of a light source to stay the same, while each lower frequency photon carries less energy, there must be a greater number (per time, per area) of the lower frequency photons in the beam than the original number of higher frequency photons.
As for the second part of your question, I admit that it can be confusing that the power transmitted by E&M waves depends on the amplitude of the wave, while the power transmitted by a mode of a vibrating string depends on both the amplitude and the frequency of the wave. Ultimately this comes down to fundamental differences in the physics of each wave phenomenon.
The energy in a vibrating string is reducible to the kinetic energy of the moving string elements and the potential energy from the tension felt by each element due to the position of its neighbors. So, at fixed amplitude, you can see that you get even more energy if you jiggle the rope faster.
The energy in an E&M wave is a different effect entirely: it comes from the average size of the (squared) electric field in the wave that can do work to move charged particles. At a fixed amplitude, if you increase the frequency you won't increase the average size of the field.