That is certainly a factor, but there is more to it than that. For companies making devices with embedded operating systems, dealing with Microsoft contractually can be a nightmare or even a ruination. Microsoft are aggressively money grubbing and can easily catch their customers, even those with the best intentions, in a Byzantine legal maze. Microsoft employ the best and most expensive lawyers too. In press releases concerning these situations, Microsoft will say "We are working productively with xyz to find a solution", which translates as "We are extracting more money or we will sue them in court".Some, most ?, NAS ( network attached storage ) OS while proprietary are based on Linux to keep the cost down.
Added to that is the fact that, being open source, Linux can be customised for particular purposes without needing anyone's permission, assistance or co-operation - unless you want it.