A 2 party system results in politicians that are more extreme then their constituents
This is only a partial answer as I support many of the other answers mentioned, in fact in practice this sort of is just a specific subset of the issue already mentioned by Cadence. Still it has statistically demonstrable effects worth discussing. For this question I'm going to use USA politics as an example, but most countries with a first-past-the-post voting system will result in similar problems.
Because we have a 2 party system we end up with effectively two layers of voting, the obvious actual vote, but also an earlier vote where a political party has to decide which candidate they are going to support in the general election. In the USA the earlier vote where parties pick which candidate to back is referred to as primaries.
During primaries candidates must first convince their own party to vote for them. In these votes the opposite party, and often independents, are excluded in voting. Furthermore even most of those who favor a political party don't actually participate in primaries, you only get the most dedicated and committed voters for your party. In order for a candidate to win primaries, and thus have a chance at the general election, they must therefore sell themselves to this small majority of hard core party members.
The way to do this is often to toe the party line hard. You need to prove you are the most dedicated member of your political party you can be, that you care and are passionately going to fix the problems your party cares about. Politicians who have policies that seem too similar to the opposite parties platform are generally attacked for not being a true insert your political party here. The net result of all this is that primaries tend to only go to those who exposed the most hard core version of their own parties platform.
Then come the real elections, where you get independents, folks who are more laissez faire when it comes to their political party, and thus more willing to vote against it, and similarly less extreme voters. These voters may prefer a more centralist or bipartisan politician, one willing to work across the aisle to get stuff done and who will stick to the things that matter to them, but well they don't have that as an option. They have to pick between extreme left candidate and extreme right candidate picked by the primaries.
The net result is whoever ends up in office, they tend to be more extreme towards their parties side of the political spectrum, because the only way they could get past primaries was appealing to the most extreme members in their party.
Since any two party system tends to result with at least some of their platform being more extreme then the 'average' voter the net result is representatives that often feel more in favor for 'extreme' views then the average voter is and thus is going to fight for what they feel is important.
To give the best recent example to my mind (and speaking only about statistics support in population and asking us all to not get into a debate over rather the policy is right or wrong!!) the supreme court recently overturned the protection for abortion, followed by a number of republican representatives in various states pushing hard to add anti-abortion legislation despite the fact that 61% of the population is actually in favor of abortion being legal in most cases and these number still tending to be above a decent bit above 50% even in the more republican leaning states.
If you look closer at the same pew study above your see that 60% of republican leaning voters that considered themselves to be moderate also favored abortion, but whopping 72% of republicans that considered themselves more conservative were opposed to abortion. It was those more conservative republicans that usually showed up at primaries, and so that 72% that vehemently hated abortion were the ones picking the republican candidates. By the time a republican made it past primaries that candidate was likely one that was extremely anti-abortion because that's the only way they could get elected in primaries. By the time general election occurred the independent and undecided crowed was not really free to pick if they wanted an anti-abortion candidate, they could only pick if they wanted extreme democratic or extreme republican. In republican leaning states they general pick extreme republican even if on average they still are opposed to anti-abortion laws because they still consider that candidate the better of the two options available.
And while I called our republicans here since abortion is the current hot button issue to discuss polls show the average American believe representatives on both sides of the aisle are too extreme, so no this isn't a republican only problem.
I should also add that social media and the echo chamber effect is exasperating this affect, studies have shown politicians, and for that mater the voters themselves, are growing increasingly polarized and extreme and odds are echo chambers play a strong role in that trend. In a sense social media is forcing politicians to more strongly toe the party line to stand a chance in their primaries.
Various countries have different voting systems with various degree of support and power given to specific political parties which affect how extreme this tendency is. For example in the USA democrat's have the idea of superdelegates which are suppose to correct partially for this tendency (and no I don't want to debate rather or not they are effective at it). However in the end of the day the very nature of first-past-the-post voting system is that political parties will be developed and they will then push politicians to tow the line, even on wedge issues, of said party so this is effect is expected to occur to some degree in any first-past-the-post country.