I know that bodybuilding makes you heavier, stronger and more attractive, but is it really beneficial for one's health in the long run?
Bodybuilding is not strength training.
Bodybuilding is a very specific practice to improve one's looks. Strength training, by contrast, is training to improve the capabilities of one's body. Strength training is the broader category, but the two should not be interchanged freely in a discussion about health benefits.
Suppose that A does strength training regularly, B does aerobic exercises regularly, C does not physical training at all. Assuming all other conditions are the same, my guess is that the life expectancy of B will be much longer than A and C, while the life expectancy of A may only be slightly longer, or even not necessarily longer than C. Am I right?
You are dramatically underestimating the health benefits of strength training.
Strength is important for long-term health, since it is a strong predictor of all-cause mortality (one, two, three, four, five) and keeps you able to do a variety of tasks yourself. Strength training improves one's ability to perform basic daily tasks, which is a major element of quality of life as one ages.
Cardiorespiratory fitness is important as well, but it owns no monopoly on health.