Hotels throw away a ludicrous amount of soap bars. Since every guest needs a new one, old ones can only be thrown away. Occasionally, even unused toiletries will get thrown away.
Although some companies try to recycle the wasted soap, it's really just more efficient to use liquid soap.