The Muiderslot, Berwartstein Castle and quite a lot more.
I can understand if it's a castle with a bad reputation, but sometimes perfectly good castles were just left abandoned for centuries.
Why do some castles get abandoned while others are used for indefinite time?
In the case of Berwartstein Castle, this was built sometime before 1152. The castle was extensively rebuilt as late as 1480, by Hans von Trotha.
The castle suffered a major fire in 1591, and was abandoned thereafter for many years.
The castle was only rebuilt by Alfons Wadle after World War II
Why was the castle abandoned? Because castles were not effective defensive structures after the introduction of the mobile siege train of heavy cannon during the Italian Wars in the 1490s. Once the castle suffered a major fire and became uninhabitable, no one wanted to spend the money to resurrect an obsolete fortification.
Why was the castle re-built after WWII? Because Castles had become romantic and for the Romance and the history, people were willing to put the work and money in to rebuild it.
In the case of the Muiderslot, the castle was built in 1280 to control the trade route to Utrecht and extract tolls. In 1296, Count Floris V, the castle’s builder, was killed. The castle was then either abandoned (or possibly demolished) for over 70 years. The castle (and tolls extracted) were unpopular with the citizens of Utrecht. It is thought that the Bishop of Utrecht may have ordered the castle demolished, or been instrumental in seeing that it remained abandoned.
In any event, Albrecht, Duke of Bavaria and Count of Holland, eventually either rebuilt or re-occupied and renovated the castle. The castle remained a fortress until 1795 (being upgraded with moats and star fort defenses several times). Then it became a prison.
Between 1824 and 1878, no one could find a use for the castle, and there were plans to demolish it, but local preservation groups and eventually King William I prevented this. In 1878 the castle became a museum, and has remained so ever since.
This castle was abandoned for 70 years, because it’s builder was killed and other powerful local groups did not like having a castle there to interfere with their trade and extract tolls. It was rebuilt because a new owner was powerful enough to overcome the local resistance.
http://www.castlesofmedievaltimes.com/muiderslot-castle.html
https://en.wikipedia.org/wiki/Berwartstein_Castle
Many medieval castles were abandoned, usually because they had become outdated militarily. For example, the first wave of castle building in Northern Europe in the 10th and 11th century built mostly wooden motte and bailey castles.
By the 13th century, an up to date castle was built of stone not wood. Some motte and bailey castles (see York Castle for example) were rebuilt in stone, but the piled earth of the motte and the bailey walls did not make a good foundation for heavy stone structures (subsidence in the motte in the 14th century at York Castle, for example, cracked the new stone keep, built in the 13th century from top to bottom).
So, many motte and bailey castles were just abandoned, and perhaps a new castle would be built on a nearby or different site.
After 1500, all castles became defensively obsolete (too easily defeated by artillery) and many were abandoned, unless they could still function as residences, were strategic enough for some power to invest in building star fort type defenses around them, or could be re-purposed for some other use.
What is unusual about your two castles is that they were abandoned and then re-established. This is more unusual. Each of these castles, however, had this happen due to unique circumstances, not because of some common pattern.