Nokia earned billions from this code. I bet those hours were paid back many times over.
Edit:
As you write they were expensive. So while Nokia was the undisputd leader in the segment for a couple of years the absolute numbers were not that big. I remember some year the worldwide phone market was 400 million a year. Nokia had over 100 million of them, but smart phones (Symbian) only single digit millions.