it's because for lifo in the periodic system it's assumed that the last goods purchased in the period were available for the first sale, and these are allocated to cogs
whilst in lifo in the perpetual system the most recent goods purchased before the sale are allocated to cogs