According to the Open Hub website, Linux has 37,016,567 lines of code, but this is small compared to NetBSD and OpenBSD, which have 72,065,568 and 81,902,070 lines of code, respectively.
Is there a reason why Linux has fewer lines of code compared to NetBSD and OpenBSD? I’d like to know.


You’re probabry including ports/ which contains all the software available for the platform
Those are just the package makefiles etc though, not the actual software (with some notable exceptions for bootstrapping, at least in NetBSD). Still it’s comparing a kernel with an OS