'' When do you work at factory?'' is also correct. Because you can work inside the factory or outside the factory, in the perimeter. The question is not asking me when i work inside or outside the factory. Look for ''in'' and ''at'' usage difference, when is about the places.