The marginal value of your time was not $0. You could have been doing something other than shopping with your time. That thing could have afforded you pleasure or had some other utility. The dollar value of that utility was not zero.
Even resting has some benefit to you. Unless your only alternative is some mildly unpleasant activity which doesn't allow you to rest, that time was not valueless.