First of all, I want to talk about the advanced science and technology in Ming Dynasty. 1592, Cheng Dawei wrote "Arithmetic Unified Sect", which was the first to use abacus to find the root. 1606, Xu Guangqi and Matteo Ricci jointly translated The Elements of Geometry. Fang Yizhi put forward the concept of time and space in Physical Volume, Sun made a magnifying glass and microscope, and Li Shizhen's Compendium of Materia Medica.
The second is the cultural prosperity of the Ming Dynasty, during which many famous operas were born, such as Romance of the Three Kingdoms, The Journey to the West, Water Margin, Jin Ping Mei and Peony Pavilion. And the official encyclopedia Yongle Dadian. Other thinkers such as Li Zhi, Wang Yangming, Wang Fuzhi and Gu pushed Confucianism to the peak.
The third is the political system of the Ming Dynasty. Zhu Yuanzhang abolished the prime minister and set up six cabinets, which is the closest reform to the modern political system. It not only ended the long-term struggle between imperial power and relative power in history, but also made the imperial power supervised by more people and ensured that the emperor would not abuse his power. This system played a positive role in the early development of the Ming Dynasty. In order to be different from the Mongolian system, Zhu Yuanzhang also abolished the provincial system and set up three local departments to report to the central government independently. At that time, Zhu Yuanzhang said that it didn't cost the people a grain to raise a million-strong army, so the army changed to a garrison system, which was similar to the official system in the Tang Dynasty.
To sum up, these points are the main reasons for the prosperity of the Ming Dynasty for hundreds of years, but why the country was destroyed by a small Jurchen tribe may be because the system is imperfect or it may conform to the historical trend.