Jesus would have been fully aware of the prophets, their tradition and their teachings. Often a prophet would not only pronounce the impending judgment that Israel’s sins would bring upon Israel but they would also recount the history of Israel including the previous sins of generations long gone and God’s saving activity. When doing so, the prophet would often identify himself with the sins and redemption of previous generations. He would use a first person plural, “we,” to claim that he was a part of this story and saving tradition of God.
When Jesus told John that he was to be baptized, Jesus was claiming in the tradition of the prophets that he was a part of the history of Israel. He was claiming partnership with Israel and Israel’s sins. He was taking responsibility for being a part of this sinful people even though he himself had not sinned personally.