I'm going to say sexist... kind of.
Taking this as a random girl and boy -
I think, statistically, the boy is in more danger than the girl of being attacked alone. I am sure that is true for the 15-24 demographic of men anyway.
I also think, statistically, the girl would likely be in more danger from the boy, who she knows, than from a stranger.
I say I think because I heard these stats a while ago and they may have changed or I may be misremembering. I know the limits of crime statistics too so you have to take that into account obviously.
If I am right though there is no practical reason for the boy to walk the girl home, indeed it actually increases the risk of harm for both of them. With that in mind you would have to look for another reason why the boy may offer to do this and sexism seems reasonable. That said most people have a very skewed view of the risk of crime so it may be that the perception of harm is wrong.
The other thing that springs to mind is if the girl may feel uncomfortable saying no, after all he is just being "polite". It's also reinforcing the idea that the boy is somehow responsible for the girls safety which is problematic.
All that said I am sure most boys just do it because they feel it's right, I would never admonish a young man for doing this.