I try to be nice, because I like to. Recently I came across the phrase "be nice to everyone, as they might be useful one day". I guess if you aren't generally nice to people (and I can think of at least two people who aren't), it's good advice.
I was involved with an example of this a couple of days ago. My boss had a CV on his desk, from someone who lives near me. He asked me if I knew the person, but I didn't. From the date of birth on his CV, I realised I knew someone in their school year, so I texted her to find out if she knew him, and if so, what he was like.
She knew him, and he seemed to be good at computers, and he was always nice to her. That was enough for this stage. If he was horrible, then his CV would be in the bin. I doubt he will ever know about this, but being nice to my friend had turned out to be useful.
I'm now wondering how many situations I'm in because I was nice to someone, or how many I've missed out on because I wasn't.