What should happen is that candidates should position themselves based on the districts that they represent. A West Virginia Democrat is a different creature than a New York Democrat, and a New York Republican is different than a West Virginia Republican. This is how it should be! The candidates should be trying to win races in their districts.
Instead we have this horrifying attempt to fix the parties in time and space and say "this is what the national party represents" and try to shape districts to align to those parties. This is the tail wagging the dog.
In a perfect world the districts should be shaped based on common interests, not based on voting record. Geography or population density are pretty good heuristics. Voting record is not because they are votes for candidates, not for parties.