In the case of Wordpress, the cost of labour for development and bug fixes on those thousands of lines (to the client) is effectively free unless you are extending it.
Yes but when you are extending it... it's not trivial. So the price curve jumps from a few hundred dollar to thousands of dollars if you try to do anything significant.
I guess the point of the article is that WP and friends already offer a significant enough amount of functionality straight out of the box or with a very minimal amount of custom code.