Can anyone explain what this pipe is in the basement?
Without the sink and pump, usually the washing machine discharge hose would be inserted in the top of that open pipe.  It is above the level of the exit pipe, and has a trap to prevent outgassing.

I would think the pump would have a similar connection (e.g. connection above drain with trap), if there were other users of that drain line.  But I guess not in this situation.  Perhaps that was added later.