Simply practicing safe computing would have avoided it. It is introduced by the user carelessly installing it without thinking about what they're installing.The infection reported by the Mac user in that link appears to be a browser infection but I really don't know what its method of infection was. If you do a search for that infection it is reported that Malwarebytes can detect it. There is a good chance other Mac security software could have detected and blocked it as well.
https://www.fixyourbrowser.com/removal-instructions/adware/beeaware/
How to Prevent BeeAware?
It is recommended to always read the Terms and Agreements and EULA’s before installing software on your computer. Do never click too fast through the installation process “Next” or “OK” button of software as you will agree to software you might not want to install.
If the installer “Download Client” offers an Advanced or Custom option button, click it to find out if there is any other malicious software delivered and installed during the installation process.