The A380 that was being scrapped was the 3rd aircraft on the production line. After being used for a short time in the test fleet of Airbus, it became the first line number that was delivered to a customer. (Line No. 1 and 2 are still owned by Airbus).
The first few aircraft leaving a new production line are usually heavier and have different wiring than later builds, because the production process has not yet been optimised. For example, the wiring in early A380 fuselage sections was too short, so that after assembling the fuselage they couldn't connect the electronic cables. This led to rework that added weight and complexity.
Therefore, the first few aircraft from the production line have higher fuel burn (due to extra weight) and higher maintenance cost (due to the one-off quirks that are not found on later aircraft). This makes such aircraft uneconomic to operate and difficult to sell.
If it is hard to make money with such an aircraft anyway (the long-range market clearly prefers twin engine aircraft with approx 300-350 passengers), scrapping it will bring the most value.
The aircraft was not at the end of its technical design life. The design life of long range aircraft is in the order of 30-40 thousand cycles (flights). With two flights per day it would take approx 45 years to reach that limit. See also What is the lifespan of commercial airframes (in general)?
I wouldn't be surprised if a few other A380s with low production line numbers will be scrapped in the next few years. However, in general I expect that the A380 will be operated for another 20+ years, especially on high volume routes to airports with limited capacity.