preventDefault() suppresses the browser's built-in context menu so a custom one can render in its place. The menu markup matches a dropdown menu exactly — role="menu" holding role="menuitem" entries, with the same arrow-key and Enter behavior.
The difference from a dropdown menu is how and where it opens. A dropdown menu opens below a fixed trigger button with the same content every time, while a context menu opens right at the cursor via a right-click, and its items can change depending on what was clicked. The touch equivalent — press and hold — is covered separately in the mobile category's "Context Menu (Long Press)" entry.
A right-click is mouse-only, so keyboard-only users need an alternative: Shift+F10 or the dedicated Menu key, or an on-screen "⋯" trigger button as a fallback.