This can happen when using an extender. Some extenders will assign alternate MAC addresses.
When connected directly to the router, the device will appear with its true MAC address. When connected through an extender, the MAC address may be changed. If you click the menu icon (three dots) next to the devices on the "Devices and Groups" page then click "More Information", you can see the devices' MAC addresses. If you look at the MAC addresses of the devices that have duplicates, you'll see that they have different MAC addresses — one is the device's true MAC, the other one will be the "virtual" MAC generated by the extender.
The duplicate devices will have different histories because portal uses MAC addresses to uniquely identify devices. To avoid this condition, you may want to consider using a hard-wired WiFi access point instead of a WiFI extender. Powerline adapters are also a good alternative.
TIP: We suggest placing duplicate devices in the same group for consistent management