Membership of BNP is incompatible with being a police officer because it's incompatible with the police force's equal opportunities policy. Police officers are contractually obliged to follow the policy. Rightly or wrongly (rightly imo) that's the justification for sacking him.
Membership of, say, the Green Party, does not conflict with the officer's obligations.