Based on the lines from "O Captain! My Captain!" the reader can infer that:
people loved the captain and are gathering in respect of him.
The use of celebratory imagery like bells, flags, bouquets, and eager faces suggests that the people are honoring and mourning the captain, indicating their affection and respect for him.