I am not Christian, but I was. This is no longer my POV.
Praying to Jesus is basically the same as praying to God, since (not sure about this) they are one and the same. This means that you are not praying to a dead person, you are praying to an avatar of reality's creator. That is why praying to Jesus is not forbidden.
As for people trying to contact the dead, that is just human nature; a human can't help but break rules and struggle against restrictions. Jesus could, because he wasn't necessarily human. was he?