When you go through a 1 block wide hole using an elytra and stop gliding, the player will display the swimming animation despite not being underwater.
Attachments
Comments 2
This is WAI. As explained by HelenAngel on the minecraft discord, there are no plans to add a crawling animation or to expand on "crawling" any further. It only exists to prevent unintended suffocation in 1 block spaces due to gliding, swimming, etc. into them. As there is no clear intent from them on expanding upon it or adding a proper animation, that makes the current setup intentional, not a bug.
Can confirm that swimming animation displays outside of water, in my case when opening doors and using equipped tools and blocks with right click.