Isn’t it interesting that this man doesn’t come to Jesus for healing? He doesn’t even know who Jesus is! What a perfect example of grace. The man wants to be healed, and apparently believes that when the water is stirred it’s an indication that the first one in will be cured (this is made even more explicit in 5:4, which some newer translations don’t include). The fact that Jesus chooses him out of all those waiting is another indication of grace, and the fact that he has been disabled for 38 years speaks to the magnitude of the healing. No water or angel is necessary. Jesus just commands that he take us his bed and walk, so he does!
Now, since work was prohibited on the Sabbath day, the religious authorities had come up with specific definitions of what work was, and had 39 different categories of work! Carrying something from one place to another was one of them. The Jewish leadership doesn’t care about the circumstances, just the appearance and the action. In truth, by carrying his bed the healed man was engaging in an act of worship and obedience! Rather than rejoice that the man was healed, the authorities want to learn who had the termerity to tell him to carry his mat! The man can’t even tell them that.
Jesus comes to him in the temple and gives him a warning. It’s not necessary to believe that the man had sinned before and caused his suffering. It’s quite possible that Jesus is just making sure that the man understands that even worse things could happen to him if he isn’t willing to obey! We often look at God’s commands as His way of keeping us from having any fun. In reality they are there to keep us out of trouble!
Once the man can point Jesus out to the religious leadership he does. We might think that’s not a great way to show His gratitude, but I don’t think the man has any concept of why it’s a problem. He simply knows that Jesus healed him, and that he can now point out his Savior to others!