To repeat myself, this assumes that the money in your 401(k) account is invested in cash and not otherwise invested. If the money was invested, then the money would experience growth and dividends/interest. So if the stock market returned, say, 10% but your loan was at 3.25%, you just lost out on 6.75% of growth. This lost earnings potential is the "opportunity cost" of taking the loan from your 401(k) account.
If your 401(k) account is being held in cash, then you seriously need spend time on a site like MotleyFool and learn about investing.