This is standard macOS behavior. It makes sense to me.
It quickly tells the user which button is the default button, and responds to RETURN,
while also identifying the cancel button, which responds to SPACEBAR, and usually ESC.
If the dialog has 3 or more buttons, it is helpful to know which ones have a standard keyboard shortcut.
If you are coming from a Microsoft Windows environment, I can see how this might be confusing at first. But after you've used a Mac for a while, it should become more intuitive.