Why don't US politicians in the Senate, House of Representatives, and Supreme Court decide to give themselves, say, 100 million dollars each? I understand that the politicians doing so wouldn't get reelected and that their political career would end, but why would it matter if they already made themselves rich?
Formally, the Twenty Seventh Amendment stipulates that salary changes made by congress cannot take effect until after the next house elections.
No law, varying the compensation for the services of the Senators and Representatives, shall take effect, until an election of Representatives shall have intervened.
In other words, Representatives would be voted out of office before they would receive the benefit, and Representatives have no incentive to approve the change for Senators who will remain in office. (A quid pro quo plan would also prove ineffective as those who would receive the future salary would have no incentive to pay back the poor ousted congressperson; the rich and powerful need a reason to give back to the poor and weak, heart isn't enough).
There are also several informal reasons why congress doesn't vote itself to become rich. Here I name a few. First,the average congressional person likely receives more benefits from office than 100 million dollars. Second, in times of divided government (when one party does not control both chambers or both congress and the executive) coordinating 268 people to become rich is difficult. Third, because both parties would receive the pay raise, they lack an incentive to empower their opposition. Finally, morals and norms can constrain behaviors. For instance,some politicians may have scruples that would lead them to avoid devastating the country's finances. There are also congressional norms that dictate behavior and constrain congresspeople from wild actions, such as blatantly putting money in their own pockets.
Taking a US-Centric approach:
On the one hand, they do--at least indirectly. For example, a politician can, and often does, becomes a lobbyist on K-Street. This is called revolving door politics and they've either avoided making laws to prevent this, or made sure the laws they do make have enough leeway and loopholes to not really impact this 'tradition'. Another example is laws they've passed to make themselves immune to insider trading laws.
On the other hand, they don't really have to. Most politicians are already wealthy. One needs a certain amount of wealth to typically enter national politics. For example, the average net worth of a senator is well into the millions. Upon leaving office, there's also plenty of opportunities to increase one's wealth. Typical positions in addition to lobbyists would be highly paid consultants, board members on large corporations, 'think tank' members, or even just well paid speaker circuit 'celebrities'.
Why don't politicians decide to pass laws that make themselves really rich?
They do. But the most effective way of doing so is not directly take government money and give it to the legislature members, but pass legislation that would benefit industry with which the representatives are associated or the companies that sponsor the election campaign.
This includes changes in taxation, regulations, wars and revolutions abroad etc.
If you want a larger answer than the U.S. , most countries have Courts of high levels, which can use judicial review, or powers vested, to determine if a law passed by the legislature is in spirit with the Constitution of the country. Also, some guys in some countries, get their Member of legislature funds for the constituency, which they can swindle. And some, can rake out money, using their influence, through various sources. So roughly, these factors combined with soundness of tact, prevent any legitimate ridiculousness from occuring.
Politicians regularly do pass laws to make themselves rich (and/or use information gathered in the course of making law to inform their investment choices). They tend to avoid doing so blatantly, as acting in such an overt manner encourages public outcry/retaliation. It's the difference between passing a "You can elect only Republicans" law and gerrymandering. Also, they'd have to amend the constitution to actually benefit themselves (at least in the U.S.)
Simply put, it is easier and less (politically) dangerous to become wealthy in other, less overt ways. A specific example is rampant insider trading by U.S. politicians. When the issue became a media focus, congress passed the STOCK Act to deflect public outcry. As soon as the media spotlight had moved on, the law was quietly dismantled.