I don't understand why you think that. Sidious had just declared himself emperor, he had just wiped out most of the Jedi, and Yoda, the most powerful of the Jedi, is one of the few of them left standing. It makes perfect sense for him to go after the Sith Lord who had just wiped out the Jedi and dismantled the Republic.
.
I do get where you are coming from here and in a sense you’re absolutely correct. I think what’s happening is that you’re viewing this as a real working world and I’m viewing it as a piece of drama. Sure, maybe Yoda fought Palpatine, then realised he wasn’t strong enough to beat him and so went into hiding. It does indeed make sense from an in-world kind of viewpoint. However, that doesn’t mean it makes sense thematically, within the story being told. The lightsaber fights in the OT and TMP meant something within the developing story, especially the OT duels. There is literally no way you could have had those movies without the lightsaber fights, because they act as a peak in the development of the character and the story. Themes and character arcs that had been developing throughout the films culminated in a meeting of two interesting characters going through their own arcs, and they had huge thematic consequences for the next films.
Look at ANH, you could say that Obi-wan sacrificed himself simply because he wanted the others to escape, that’s the in-world logical answer. What’s important, however, is its place within the story. Obi-wans sacrifice makes a powerful statement to Luke which is carried throughout the movies into the ESB and ROTJ duels when Luke also sacrifices himself instead of seeking power. It also emphasises the fact that Luke will have to continue on his own and it marks and important change in his development from idealistic farm boy who nearly gets killed in a bar, to the desperate to prove himself jedi apprentice, to the mature man of ROTJ. It is a key part in the structure of those films.
Now let’s look at the Yoda/Palpatine fight. There’s no reason it should be in there. Yoda could have just realised he’s not powerful enough to begin with (since he’s been totally duped and played like a fool the entire trilogy), not had the fight, and there would have been no problem, because the fight played no part in the dramatic story being told, just as Yoda himself played no part in films. Same with the buzz droids, Yoda’s fight with Dooku, or the fight with Grevious: No dramatic value at all, totally redundant.
Neither Obi-wan or Yoda had anything to do with the story of AOTC and ROTS. They don’t develop, and they don’t really play any important symbolic role for Anakin, contrast this with the OT, where the characters are continually developing and reacting to each other. The only person who goes through any sort of arc in the second two prequels is Anakin, and even that its totally clumsy and disjointed. Like you could say that Obi-wan is important because of the final fight, but that part could have been played by any other jedi. From the start of the fight to the end of the fight nothing changes between the two characters other than their location, you could have gone straight to the high ground bit and it wouldn’t have made a shred of difference because there is nothing between the characters.
The only character who you could argue changed is Anakin, and even that’s pretty dubious; he was evil from the moment he turned up in AOTC. Certainly any sort of ‘development’ finished after he killed all those sand people, and even before that he behaved like a complete ass.
Now obviously TPM isn’t perfect, it isn’t even good, but it is better. Each character develops throughout the story, or by their actions lets another develop. There’s also room for more development in the next films. Anakin may be whiny, but he’s also intelligent and mature for his age, with idealism you can imagine being corrupted and tested by the reality of life, therefore leading Anakin to want more power. I felt that the slavery thing would make an interesting part of Anakin's development, but then it totally doesnt matter in the next films. Obi-wan goes from being carefree and slightly worried about Anakin to being more serious, and devoted to his training, due to the death of Qui-gon. Padme goes from being surrounded by functionaries to a proactive leader. Even Jar Jar does SOMEthing, although he is obviously the weak link here, but then he is only the comic relief.
It’s kind of hard to talk about because the second two prequels have no structure at all. If Yoda had gone to fight Vader with Luke in ESB then it would be immediately obvious because everything else in the movie is working. ROTS and AOTC is all such rubbish that it just blends together in one big mess.