Rationally, purchasing hurricane insurance makes economic sense, and I am likely to do so, even though I do not expect my house to be destroyed by a hurricane.
But your decision to purchase insurance had nothing to do with the "confidence" you had that your home wasn't going to be destroyed by a hurricane, or your "expectation" that your home would be destroyed by a hurricane. If you expected it to happen, you'd live somewhere else instead of buying insurance. Your decision to purchase insurance did have to do with your confidence that the insurance was a good investment, despite the expectations that you weren't going to need it and the expectations that its lost money.
Look at it instead like a horse track bet. 5 horses are running. One (A) has odds of 1/9. One (B) 1/2. One (C) 4/5. One (D) 1/1. And the last (E) at 50/1. Without knowing anything else, what horse do you expect to win? Probably A. Why? Because the people that are supposed to know something about the horses and their performance put the lowest betting odds, or the smallest payout in the event the horse won, on horse A. Does that mean horse A will win? Not necessarily, but you expect horse A to win. Do you believe that you know anything more than the individuals who's job it is to know how the horses will perform? Of course not. So you expect horse A to win.
Now lets say that you have $2 to bet on a horse. All five look healthy. All five look like they could win. But you expect horse A to win. Does that mean you bet on horse A? Probably not. Why? Because if you bet on horse A, your $2 will return $2.20. Statistically, all other things being equal, horse A has a 20% chance of winning, and yet you only get $0.20 return on that investment (assuming a bet is an investment, which it isn't). Instead, if you bet on horse B, that $2 investment would return $3.00. Horse C would get you $3.60, Horse D $4.00, and horse E $102.00. The potential return of horse E is 51x your initial "investment," and so maybe you consider it a good gamble. You consider it a good gamble not because you expect to win, but because you believe the odds were disproportionately calculated. You believe all things being equal, horse E has a 20% chance of winning. Of course not all things are equal, which is why there are different odds put on each horse. But you still believe that 50/1 odds are so much of a deviation away from the statistical odds of winning, all things being equal, that you place the bet anyway.
When you placed the bet did you have any expectation that horse E would win? No. Were you confident that horse E would win? No. But you placed the bet anyway. Why? Because the potential return justified the higher risk. And you felt comfortable with that bet. What made you feel comfortable? Everything tells you horse E won't win, and yet you bet anyway. You lacked total confidence in the horse, and the jockey, but you place the bet anyway, because you have confidence in your investment. The placing of the bet doesn't mean you necessarily have confidence in the track, or confidence in the moral or ethical concept of horse racing (which is what the SEC considers market analysis of "investor confidence" to be). Instead, you feel confident that the odds weren't accurate on horse E. Or, that if that race was ran over and over again, more often than one out of 51 times horse E had a chance of winning.
You had confidence in your investment. Not the horse. Not the jockey. Not the stable. You had no expectation horse E would win. But you did have confidence that your bet, absent all the known quantities at play, was the right decision.
The same applies to stocks. People will invest in a stock knowing that another company will perform better. But their investment, despite being in a wrong company, will still return a greater profit. The individual doesn't have any more or less confidence in the company, but they do have confidence in the investment.