Just killing stuff even if there is no apparent reason now also is considered for the mere purpose of gaining XP. This also helps the non-cheating AI to keep attacking enemies when they can't see anything worth exploring behind them.