A helpful gene can pull nearby genes along with it
When natural selection makes a useful gene variant more common, nearby DNA can become more common too simply because it sits close to that gene on the same chromosome. Even neutral or slightly harmful variants can sometimes be carried along this way.