What it does is that it retrieves from the database the Entity ShoppingCard that has the same id (unique key) as the object ShoppingCard in memory and stores it in the Object ShoppingCard_2. With this, you can check for the differences between the two and act on them in a Microflow. In short, you can use it to act on differences of the object in memory and in the database (on disk).
After the commit of $ShoppingCard, and retrieving $ShoppingCard_2, they are identical.
The != is retrieving a list of all ShoppingCard excluding the one in menory.