I know there are differences in how stuff is removed from a Mac than from Windows.
However it would appear that your uninstall wasn’t completed successfully, hence the problems. In the Windows version there is an Uninstall Utility which can be run in safe mode to remove such remnants. I don’t know if the same existed for the Avast for Mac installation.
Though there were lots of other hits in that first search link I posted, such as this one, How to Uninstall Avast: Quick Removal and Thorough Cleanup
Which would appear to be closer to the issue you have.