Analogy is a literary device for conveying an idea. You obviously understood the idea being conveyed, thus, the analogy did exactly what it was meant to do.