Direct answer: Frequency is only one part of compatibility. The transmitter and receiver also need a matching code format and programming method.
Think of frequency as the radio channel and the code format as the language spoken on that channel. Two devices can be on the same channel and still not understand each other.
That is why shopping by “315 MHz,” “318 MHz,” or another frequency alone can lead to the wrong remote.
Related: Does frequency alone tell me if a gate remote will work?.