Vertical installation is not uncommon and is allowed by the local municipality. I agree though, horizontally installed is better. Regardless of configuration, this shows the need to clean a dryer vent regularly.
Bottom photo shows that the dryer vent (which runs vertically to the roof) somehow became disconnected at one of the joints beneath the roof deck in the attic. Excess lint accumulation and blocked venting = fire hazard.
Top photo shows premature snow melt due to warming of roof via disconnected dryer vent.