“for David’s sake.” God had made a promise to David that he would have descendants sitting on his throne in Jerusalem.
“God gave him a lamp.” The “lamp” is tied into the promises God made to David, that he would have descendants on his throne and Jerusalem would be established as the capital of his kingdom.