Curve modifier breaks object's position
From your blend file:


Select the curve and Apply All Transforms
Create a new cylinder at the origin
Scale it to desire shape
Apply All Transforms on the cylinder
Add Array and Curve Modifier to cylinder
Select the curve, and in Edit Mode do Ctrl T to adjust the tilt