If a villager is pushed by other entities while on a bed, they would move just like being pushed without on a bed. Thus they may end up in an awkward position. (See attachment)
In addition, if players right-click a bed right after they jump on it (before felling back), they would 'bounce' after they start sleeping and cause visual glitch or some times stuck in a block.
Linked issues
Attachments
Comments 1

Thank you for your report!
However, we are already tracking this issue, and this report is a Duplicate of MC-145707, which has been marked as Works as Intended - this is an intentional game feature. If you have a different opinion, please visit the Feedback website.
Please use the search function in the future to prevent duplicate reports.
Quick Links:
📓 Issue Guidelines – 🛠 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
💬 Mojira Subreddit – 💬 Mojira Discord