I'm not a programmer by any means. I am involved with writing though, and often I have to draw on other people's work to support an assertion I'm making. I just use some quotation marks "" and cite the author and page number at the end of the sentence (author #).
I know it isn't a one to one example, but I wonder why it is acceptable to quote and cite with no need for permission in literature, but when it comes to code people "own" their ideas?
With regard to copyright, it's usually a question of quantity. Up to 10 lines of code is often regarded irrelevant for copyright purposes. Of course, it's not as simple as that: 10 lines in how concise a language, etc. But it's not a big problem most of the time, in the same way literary or other human-language text is copyrighted but it's still acceptable to quote and cite.
But ideas themselves don't fall under copyright; unfortunately, some countries allow the patenting of software algorithms, which do cover the idea to some extent.
I know it isn't a one to one example, but I wonder why it is acceptable to quote and cite with no need for permission in literature, but when it comes to code people "own" their ideas?