If a politician is elected in a democratic society, that politician is supposed to put the policies into action that he/she promised during the campaign. The people elect the politician based on these policies. These policies likely reflect the politician's general philosophy about how government should be run at that time. But, in a country like America when the Congress is divided into two opposing parties, the politician should be willing to compromise his philosophy in order to get things accomplished. So, there are times when philosophy and politics are at odds with one another and this is not necessarily a bad thing.
However, there are examples (listed already) of people who did not compromise their philosophies. Gandhi and Martin Luther King Jr. put their philosophy completely into their politics for completely good and ethical reasons. Hitler also instilled his philosophy into his politics for completely evil and nationalistic reasons. So, there are times when philosophy and politics merge and this could result in real progress (Gandhi, MLK) or it could result in tragedy (Hitler).
Many people see philosophy as a solitary act, the practice of constructing a set of beliefs based on knowledge, ethics, science, community, etc. Politics is a social act. So, there is a tendency for philosophy and politics to be at odds because individuals with different philosophies must interact with each other and discuss how to run the government.