They may have made a fatal mistake and think that in another game they can win.
It happens sometimes. You could make a mistake, or miss a mating pattern, and suddenly you've lost the game although you thought you were in the lead. In this case, many people may ask for a rematch because they think that they should have won and want to redeem themselves. If you decline this request, they may see it as claiming a "cheap win".
They may also get offended by you declining their request because they might see it as "running away" from them, a more able player. This is almost insulting because they may see it as acknowledging that they "should have won", but running away with the victory regardless.
They could be Rating Farming.
If your opponent beat you by a large margin, they may ask for a rematch in order to secure a couple of easy wins against you, especially if you have a higher rating than them. Declining this rematch is denying that possible rating boost and could be taken the wrong way.
Both of the above reasons depict your opponents in a rather negative way, however I think that anyone who blocks another user on the basis that they won't accept a rematch request may not be the best sportsman. The thing is, if they are asking for a rematch because they like your playing style, or want to learn from you, they aren't going to block you if you decline, are they?
Perhaps it's me, perhaps not, but I think that anyone who blocks others for not accepting a rematch is either trying to get easy wins for rating or annoyed / in a bad mood about their own play.
Being frustrated about making mistakes, if allowed to affect your play, will lead to more mistakes and more frustration. Frustrated players make rash decisions and are more likely to take out their anger on their opponent.
I don't think you are breaking any unspoken code of online chess, I just think that some of the chess players out there lack a certain amount of maturity. Take them to a real tournament where you are face to face with your opponent and perhaps they'll learn some tips.