How could macOS be POSIX compliant without vi?
It's actually optional.

Per the The Open Group Base Specifications Issue 7, 2018 edition
 in the  Shells &amp; Utilities Volume, the vi command states:


  This utility shall be provided on systems that both support the User Portability Utilities option and define the POSIX2_CHAR_TERM symbol. On other systems it is optional.


That particular specification is a component of the Unix 03 product standard which is what macOS Catalina is certified for.