It's general knowledge that economists love markets because they help us achieve our end goal—managing scarce resources. You see, resources are finite, so how do we determine who gets what and when? Either one entity decides for us all (dictatorship or socialism), or we let demand and supply market forces decide (capitalism). Either way, scarce resources have to be allocated somehow.
While capitalism is the more popular option, largely because it creates incentives for maximum efficiency and profits, it has shortfalls. Externalities, which are a type of market failure, are one of them. An externality is an uncompensated cost or benefit to a third party caused by producing or consuming a good or service. A positive externality would be if your neighbour was an orange farmer and some of their oranges fell onto your land. You would get to enjoy their sweet oranges, free of charge—a benefit to you caused