neoshare interview question

Why did you used design patterns like this?