The building was built for employees of the Woermann line. (Woermann was a trading company with its own ships) One of the families that moved into this house was called Ritter, hence the name.
Today the building houses the Office of the Ministry of Environment and Conservation. Among other things, you get the permit for the Dorob Park / Namib Naukluft Parks.