We can understand the situation by this example.
Imagine you are a shopkeeper. From an agent you buy 100 toys. Each cost $10. So you will pay 100*10= $1000 to buy the toys. Then you mark the price of a toy as $14 and place it in the shop. Since the price is too high no one buys them.
So you will give a discount or a decrease in price. Let us say you mark the discount price as $12. Then we imagine that all the toys will be sold. So you will get 12*100 = $1200. Your cost is $1000 but you earned $1200. So here even though you gave a discount you have a profit.
Let us say even for $12 no one will buy them. Then you realize that you can’t keep them in the shop forever and you decide to sell them $8 each. So when you sell all the toys you will get 8*100 = $800. You cost $1000 for buying them but by selling you earned only $800. So you have a loss even though you gave a discount.
In the first instance you will get a profit but it is not the profit you expected. You expect 14*100 = $1400 by selling toy. But you got only $1200. In that case it’s kind of a loss. Actually it is a loss of profit margin.
Usually, when a shop keeper sells an item for discount, he will ensure that the discounted price is still above the price that he bought the item for. So, the shop keeper will still earn profit. Although the shop keeper earns less money per item sold, more people would want to buy the items when they discover that the item is discounted.
Eventually, more people buy the items so the shop keeper will, in most cases, earn more profit than selling at the usual price.