This is really two questions about yield and contents.
Content
As others have noted, an annuity is a contractual obligation, not a portfolio contained within an investment product per se. The primary difference between whether an annuity is fixed or variable is what the issuer is guaranteeing and how much risk/reward you are sharing in. Generally speaking, the holdings of an issuer are influenced by the average "duration" of the payments. However, you can ascertain the assets that "back" that promise by looking at, for example, the holdings of a large insurance or securities firm. That is why issuers are generally rated as to their financial strength and ability to meet their obligations. A number of the market failures you mentioned were in part caused by the failure of these ratings to represent the true financial strength of the firm.
Yield
As to the second question of how they can offer a competitive rate, there are at least several reasons (I am assuming an immediate annuity) :
1) Return/Depletion of Principal
The 7% you are being quoted is the percent of your principal that will be returned to you each year, not the rate of return being earned by the issuer.
If you invest $100 in the market personally and get a 5% return, you have $105.
However, the annuity's issuer is also returning part of your principal to you each year in your payment, as they don't return your principal when you eventually die. Because of this, they can offer you more each year than they really make in the market.
What makes a Ponzi scheme different is that they are also paying out your principal (usually to others), but lie to you by telling you it's still in your account. :)
2) The Time Value of Money
A promise to pay you $500 tomorrow costs less than $500 today
A fixed annuity promises to pay you a certain amount of money each year. This can be represented as a rate of return calculated based on how much you have to pay to get that annual payment, but it is important to remember that the first payment will be worth substantially more in real purchasing power than the last payment you get. The longer you live, the less your fixed payment is worth in real terms due to inflation!
In short, the rate of return has to be discounted for inflation, it is not a "real" rate of return. In other words, if you give me $500 today and I promise to pay you $100 for the next 5 years, I am making money not only because I can invest the money between now and then, but also because $100 will be worth less five years from now than it is today. With annuities, if you want your payment to rise in step with inflation, you have to pay more for that (a LOT more!).
These are the two main reasons - here are a few smaller ones:
3) A very long Time Horizon
If the stock market or another asset class is performing well/poorly, the issuer can often afford to wait much longer to buy or sell than an individual, and can take better advantage of historical highs and lows over the long term.
4) "Big Boy" investing
A large, financially sound issuer can afford to take risks that an individual cannot, such as in very large or illiquid assets, such as a private company (a la Warren Buffet).
5) Efficiencies of scale
Institutional investors have a number of legal advantages over individuals, which I won't discuss in detail here. However, they exist. Large issuers are also often in related business (insurance, mutual funds) such that they can deal in large volumes and form an internal clearinghouse (i.e. if I want to buy Facebook and you want to sell it, they can just move the stock around without doing any trading), with the result that their costs of trading are lower than those of an individual.
Hope that helps!