I think you have other characteristic present in the layout as well which you have not shared in the screenshot.Based on that only you are getting more rows for each employee.
Otherwise with just Empid in rows it should aggregate all the data and show 2 only.
Please check the same.
Regards,
AL