Question: why friction is a non conservative force?
Answer: Gravitational and electrical forces are conservative. Friction is non-conservative because the amount of work done by friction depends on the path. One can associate a potential energy with a conservative force but not with a non-conservative force.