Any explanation.please what is wrong.?
== checks for equality between two values and returns a bool. However, your result is returning false becuase equality checks on object types evaluates the pointers, not the objects they point to. To get a better understanding of what this means it is important to understand the heap (where objects are stored on memory) and the stack (where pointers to objects, and value types are stored (generally)) and learn about how objects are structured in your computers memory.
Anyway, your result is correct as the pointers are different - you can have multiple different pointers which all point to the same object. As you want to evalaute the objects themsleves (i.e. ElementId), use Object.Equals() if you are using Dynamo 1x, or the renamed List.Equals() in Dynamo 2 (cc @Michael_Kirschner2 totally counter intuiative renaming btw) instead and you should get the result you expect.