What are the blank files in my Home Folder of macOS? file names: /build /el_capitan /optional /recommended /yosemite etc
All the files are created at the day I opened my mac for the first time (iMac (Retina 5K, 27-inch, Late 2015))
They look like zero byte files created by an error of some sort. A good culprit is a script that has a path variable that usually points somewhere else and doesn't catch that the parameter or variable is blank - so your home folder (the current working) directory gets spammed.

I'd be slightly concerned since it's creating these wrong - what else is going wrong in that script? Deleting wrong files, or worse?

I'd be interested to see what the detailed information is for them. You can get this information using Finder list view, or via Terminal with ls -la. Whilst you're in Terminal, you could also do file "/mavericks" and see what that comes back with - it identifies the file type by its contents.

Did you buy your Mac brand new or previously used?