DeFi platforms are offering variable rates based on how many farmers and how much value is deposited that is trying to earn the same fixed amount of tokens, and those tokens current exchange rate. They are using present/historical data, as well as current exchange rates. These are not projections. Also do notice that APY, and APR are used interchangeably and inaccurately and not in any uniform way across platforms. Platform developers typically just choose whichever number shows the greater percentage.
Some DeFi platforms are just diluting their own token for some time, or indefinitely, and people earn that and hope the exchange rate support the greater supply long enough to convert out. Some DeFi platforms are successful at building a demand model and utility to offset the supply. Other DeFi platforms are doing something monetarily productive that earns the platform money which is distributed to stakers or farmers.
Hope that helps. There is no one way to evaluate or dismiss all defi products with a yield, but there are some patterns to look for and to understand why they attract so much capital on deposit so quickly. Much of the capital comes from CeDeFi looking for yield that won't cause them to loose all the customer money.