There are three major reasons why the short run aggregate supply curve (SRAS) slopes upward.
First, it does so because resource prices are sticky and it can be easier for firms to reduce production than to reduce costs when the price level drops. If the price a firm can charge for its products drops, it will want to reduce its costs. It might, for example, want to reduce wages. But workers will not be likely to accept wage reductions. Instead, the firm simply lays off workers and lowers production.
Second, there is generally a pool of unemployed people who can be used when price levels rise. When prices rise, companies will want to produce more things. They can do so because there are unemployed people who can be hired to augment the firms’ existing workforces. Thus, when price levels rise, so does output.
Finally, resource owners (notably workers) will be more willing to sell their resources when prices rise. If firms can charge higher prices, they are also likely to pay higher wages. If they are willing to pay higher wages, more people will work more hours. Thus, when the price level rises, so does the amount of work being done and, therefore, so does output.
For a much more detailed discussion of these factors, follow this link.