I have some unepected behavior and was hoping someone could shed some light on how the underlying pieces behind this code work to cause this issue.

The code below is intended to create a...