Loose connections for circuit breakers generally happen over time, usually because they were not properly tightened during installation. As electricity is used, the circuit breaker produces heat. It is this change in temperature that causes connections to loosen over time.
When having a circuit breaker replaced in any electrical panel, it is important that it is replaced with a breaker that is listed as compatible to the electrical panels. Oftentimes, while providing electrical service, we come across breakers that were installed into electrical panels that were not listed for installation into that specific electrical panel or distribution panel. Yes, the breaker may still work temporarily, but under the right circumstances, this can be dangerous. And, the breakers may not work properly long-term.