They don’t sell milk or soy milk in gallons. The soy milk I got was 936 mL. 936 mL is 0.2472 gallons, which just so happens to be close to a quarter gallon. A quarter gallon is closer to 946 mL.
When I wrote the previous comment, I actually thought that 936 mL was exactly 1/4 gallons, and it kind of surprised me. The tool I used to convert units rounded the result to 2 decimal places.