Patents are government monopolies created to incentivize inventors to share their inventions so others could build upon them. The fear was they'd hide their IP behind factory walls and innovation would be slow.
Now patents are used by those who don't make anything and often don't even invent anything in order to blackmail those who do.