Publishers serve mainly as a bank, paying the developer an advance which usually goes 100% into salaries. But traditionally have been doing marketing, and some production tasks like testing or localization, sometimes they have more influence over platform owners (Sony, Microsoft, Nintendo, ...)