What's the deal with clearance lights?

What are clearance lights on pickups and heavy trucks used for? I thought they had a purpose, but sombody told me they were just for looks.

Can somebody help me with this?

Thanks

They help to identify the vehicle in the dark. By outlining the entire vehicle horizontally and vertically, or at least identifying the corners, other vehicles encountering them in the dark know how much clearance will be needed in passing, overtaking, etc. Presumably, if you know that the approaching vehicle is a large truck instead of a small sports car, you may think twice before pulling out in front of it. That works in theory, but it doesn’t seem to have much effect in practice.

That said, it only takes a few strategically placed lights to accomplish the necessary effect. All the extra lights are purely there because someone thinks they look cool.