I’m curious, would Apple know if you are building on Linux on a Mac, or building on Linux on PC?
Apple is absolutely slurping up any and all data they can get about your machine, you, whatever is visible on the network, nearby WiFi networks and your physical location.
They have no reason whatsoever to not do this, they explicitly do this on iOS, and there is a lot of money for them to sell the data they collect about you.
This is how modern corporations are. Apple is no different from Google, Facebook, Microsoft, et al.