The joke is a pun.  Giving 'an inch' to someone means to compromise on something they are demanding.  An inch is also a unit of measurement found on a ruler, which is a stick with markings to measure distances up to a foot.  A 'ruler' is also a word that means someone who has authority over someone or something, like a king or president.
If you give some managers an inch they think they ' re a ruler .