Election to office is an indication that voters generally agree with your claims of expertise, and thus are proclaiming you an expert.
Voters who want someone in office who is not an expert at governing vote for someone who doesn't claim to be an expert.