Possibly to stop people tripping over the rails ?
I our area, where the ram runs on roads the rails are set into the road surface, so do not stand proud of them. Where the tram uses a former rail line and people have to cross from one platform to the other there is something to raise the pedestrian bit to the level of the rails. Can't recall whether it's wood slats or concrete though.
The tram service round here gets it's electricity from overhead wires, and the only other tram services I have used (or seen) also use overhead wires to supply the power. I'd guess this is done to stop people from frying themselves on live rails at ground level, but that might be optimism on my part.