Are both A and W versions needed in Windows API declares

As has already been mentioned.

Use W unless you want to code for Win95/98/Me or older where it’s not guaranteed that the Unicode update has been installed, every OS since has native support for Unicode so using W is best and using A on those systems will incur an overhead of a conversion from ANSI to Unicode. As modern Xojo doesn’t support those platforms anyway, you’re fine just using W. Any calls that don’t have a A/W variant will be newer calls and will be Unicode anyway.

Apps can be compiled for ANSI/Unicode where you would need to use the correct calls for the binary type but as Xojo produces Unicode binaries W is recommended.

As for why people still code for W/A, requirements/habit/lack of understanding/legacy code I guess.