There are plenty of non-profit software projects headquartered in Berlin, e.g. KDE since 1997, and they seem to do just fine.