Convention is such that if the system absorbs heat (or is being worked on) its internal energy goes up, when the system gives out energy or does the work, its internal energy goes down.
Think about it this way: you heat something. Where does the energy go? It goes into the system, so its internal energy increases. Now, the system does work on something. That means system uses energy to do the work. Where does this energy come from? It comes from the system, so the internal energy of the system goes down.