What is an imaginary boundary?
Boundaries are defined with respect to the system in observation.

Imagine you're in a room with the door closed. Say, you are measuring the temperature of the room, i.e. the room is your system. In that case, it's easy to understand that the boundaries are real. In this case, the walls, the ceiling, the closed door comprises the boundary of the system. 

Now, say somebody opens the door. Understand that this does not change the system; you are still interested in measuring the temperature of the room only. So, we can say that at the place of the closed door, there is an imaginary boundary. By specifying the boundary, you are now able to define your system more clearly.

This concept of imaginary boundary helps us to clearly define our system.