Yep. Some companies plan this way from the start, but almost all do it once they get mature enough where these type of financial engineering optimizations can really make sense to spend time and expertise on.
I have read that something like 5% of Starbucks' accounting liabilities are gift cards that have not yet been redeemed. So again in a simplified financial view, that is a loan at 0% interest, and some percentage of that "loan" will never get called in.
I guarantee you they have models about what percent and at what rate over time that "loan" actually gets "called in" (redeemed for coffee and store employees' time).