Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Why do dropdown menus have a space between the highlighted item and the border of the menu?
No reason at all. This is not even a standard pattern. There are examples without it that work well as well:
You could do both ways.
More relevant question for a graphical designer point of view rather than UX.
Required, but never shown