It’s not about sync or async, it’s about what modifies the state of photoshop and what doesn’t (- getters don’t).
From the docs link you’ve posted:
A key concept to understand before diving straight into Photoshop UXP plugin development is what we have termed “execute as modal”. Any and all commands that may modify the document , or the application state , must utilize executeAsModal.