The profit in speculation comes from correctly recognizing that a good will be worth more if consumed in the future than it would be if consumed in the present. It can be annoying to those who would have preferred to use the good in the present and are unable to afford the anticipated future prices, but in the end society benefits by having the good still available in the future for the more valuable use.