Random folders are considered apps Recently I had switched over to a mac and pulled over my project from git that I was working on in linux environment. Now when trying to import the said project into various applications, Finder considers those folders as apps, even though in terminal they appear as normal directories (without their .app filename ends).

After further inspection I found that finder has special treatment for folders that end either in .service or .app. How come?
.app files have always been Applications for macOS. In reality, as you have seen, they are just a directory. If you right click and click "Show Package Contents" you will open the directory as a normal folder.

Most of the time the extension is hidden. This can be changed in File > Get Info >  Hide Extension.

I would suggest changing the extensions. If you prefer to keep the .app extensions you can change the a to a different Unicode character (that looks similar to an a). This will prevent it from being detected as an Application.