If the player is right up against a block, double tapping the forward key will cause them to start sprinting for a moment. Then the game sees that they hit a block, so they stop. However, if you just hold the sprint key, this doesn't occur. There's a check happening when the sprint key is used that isn't used when double tapping the forward key.
Confirmed. Ctrl + W and W W both cause the player to sprint briefly, but W + Ctrl doesn't. I think the difference is that you are already moving if you use W + Ctrl, but in the other cases, you aren't.