I've worked in state and federal positions for about a decade now. Some of those roles have brought me close to elected officials, so I can speak from a bit of experience.
Should your political views match those of your bosses? If your position is a government position and you are hired as a staff member, then your political views will be largely irrelevant. There are a few situations where your views may matter a lot:
- You are a political appointee. In this case, you are likely "hired" based almost entirely on your views matching your boss's.
- You aren't a government employee, but working in the office of an elected official (perhaps as legislative staff, campaign staff, personal advisor, etc.).
- You aren't an appointee, but you are very visible and have significant discretion over policy choices.
As a staff member in a government office, you will be expected to enact public policy whether you agree with it or not. Your own beliefs and values should not influence how well you do your job. All of the offices I've worked in enforce a very clear code of conduct which includes non-partisanship. You should expect people to discuss public policy in a professional tone based on the function of your office, department, and specific job.
Federal jobs may fall under the Hatch Act, which describes what kind of political activities are allowed. The specifics will vary based on what kind of job you have. Some state and local offices opt to follow the Hatch Act, even though they aren't required too.
During the hiring process, it's best not to discuss your political views unless asked. Offering your views up front may indicate that you aren't able to perform your job in a professional, non-partisan way. It is acceptable to answer questions about your field, but do so in a non-political way. For example, if you were an auditor in a Department of Labor you could expect questions about fraud in unemployment programs. This isn't a question about you personal political views, but about the job of being an auditor and their business environment.