Question answer
The answer is simple. Jesus was baptized to be set apart to the people around him. God put in him the desire to be baptize to fulfill all righteousness, so then God the Father would anoint him and set him apart, "This is my dearly loved son, who brings me great joy". I think that it also fulfills prophecy in some part as well.