This is a tilt against those preachers who condemn in the pulpit the very things of which they themselves are guilty. It is also used humorously by those who have been caught out.
‘Dad,’ said Willie at the breakfast table, ‘I thought you told me not to read at meal times. Now you’re doing it yourself.’
‘Do as I say, Willie, not as I do,’ said his father over the top of the newspaper.