In my opinion, bonds serve and important purpose in a portfolio that is not well duplicated by other asset classes. It’s not so much like/dislike as compliment to achieve overall portfolio and financial goals.
If held to maturity, a reliable bond will pay the rate specified in the bond contract, which you know before you purchase. Bonds didn’t do well in certain recent years because the buyer’s purchased bonds at a low contracted rate. For example, suppose you bought a 5-year treasury 5 years ago, in late 2020. At the time the contracted rate was approximately 0.3%/year. If held to maturity, you’d get a constant 0.3%/year. It should not come as a surprise that these bonds did not do well and only had an annualized return of ~0.3%/year if held from 2020 to present.
If not held to maturity and sold on secondary market prior to maturity, bonds may be worth more or less than original purchase price if the federal funds rate and corresponding market demand for bonds of that duration and rate changes from previous expectations. In general if fed rate increases more than market expects, secondary market prices go down. And if fed rate decreases more than market expects, secondary market prices go up. With the 2022 inflation and rapid change in fed rate from ~0% to ~5%, bond value on secondary market shot down rapidly. Instead of getting the +0.3% rate listed in the contract, if sold prior to maturity, the bond holder might have had a net loss. Historically, severe market crashes are more likely to go in the opposite direction – fed decreases rate to stimulate economy, increasing value of previously purchased bonds, if sold on secondary market prior to maturity.
The previous 0.3%/year return is not especially relevant to whether current and future bonds will “do poorly” because the contracted rate is no longer 0.3%/year . New 5-year treasury is contracted to pay ~3.7%/year. Other durations and other bond types pay other rates. Whether this is good/bad depends on how important it is to you have a fixed rate of return that isn’t well correlated with performance of stock market or other assets.
