Thank you for your question. While the traditions from the Infallibles (as) encourage a positive attitude towards sickness and all types of trial, that does not mean that they sought those difficulties and didn't seek well being. Rather, Islam is a religion in which all types of well being are encouraged, and there are plenty of hadith supporting supplicating for good health and the prevention and removal of calamities as well as prescriptions for good health and wise maxims to help a person navigate their lives as effectively as possible. A Muslim is successful in this world and the next, attaining well being in both. Even if their situation is difficult, a Muslim should develop their personality such that they are always in a good state even if the world is falling apart around them.
So the encouragement to have a positive attitude is not the same as seeking problems or having a defeatist attitude. Rather, it is to build a Muslim to be able to progress in every state. For more on the philosophy of test see these short podcast episodes:
May you always be successful