Experimental evidence stresses the importance of so-called social preferences for understanding economic behavior. Social preferences are defined over the entire allocation in a given economic environment, and not just over one's own consumption as is traditionally presumed. We study the implications for competitive market outcomes if agents have such preferences. First, we clarify under what conditions an agent behaves as if she was selfish - i.e. when her demand function is independent of others' behavior. An agent behaves as if selfish if and only if her preferences can be represented by a utility function that is separable between her own utility and the allocation of goods for all other agents. Next, we study equilibrium outcomes in economies where individual agents behave as if selfish. We how that one can identify a corresponding ego-economy such that the equilibria of the ego-economy coincide with the equilibria of the original economy. As a consequence, competitive equilibria exist and they are material efficient. In general, however, the First Welfare Theorem fails. We introduce the class of Bergsonian social utility functions, which are social utility functions that are completely separable in all agents' material utility. For such social preferences, the Second Welfare Theorem holds under a suitable growth condition. We also establish that in uncertain environments, agents with social preferences typically do not behave as if selfish. Furthermore, in the presence of public goods, both demand and equilibrium outcomes depend on social preferences.