Light travels in a straight line in a pinhole camera because there is
no refracting or reflecting optical element to change the path of the
rays of light. The bottom of the film is on the line passing through the
pinhole and top of the object. Since all light must pass through the
pinhole, that means the top of the object exposes the bottom of the
film.