Another instance of a sole beneficiary challenging the will is if the estate is given to the sole beneficiary in trust for several years with outright distribution not being made for a long time. The beneficiary's loss is the tying up of the trust funds for years together with the cost of the trustees commissions over the time the trust is in effect. In this situation, the trust would have no contingent or succeeding beneficiary otherwise, you would not be the sole heir under the will. A will with at trust without a contingent beneficiary is ripe for a will contest, because such a trust lacks such an important part, that it looks like a mistake that may be evidence of a lack of proper testamentary intent.
This question presents an interesting opportunity to explain some technicalities of probate law. This is an exercise in semantics; however, in strict technical terms an heir is a person who inherits a decedent's property when there is no will. A beneficiary is a person who receives a decedent's property when there is a will. Sometimes beneficiaries are called "legatees" if the receive personal property and "devisees" if they receive real property. Most modern probate laws have abolished the distinction between legatees and devisees, so the difference in meaning is mainly historical now rather than legal.
So, if a person is the only "heir", meaning the only person who would inherit in the absence of a will, and if the will gives all or part of the estate to other persons or entities, the heir can obviously challenge the will, because he has the appropriate financial interest to give him/her standing to sue. Generally, standing to sue exists only when a person is "aggrieved" by the probate of the will, meaning he or she suffers some sort of financial loss because of the will. The heir's loss is that he/she would have received more money but for the will. He has standing to sue, but he still has to prove his case.