It puts a thought in quotation marks without saying I thought, reporting a guess or a puzzled reaction that ran through your head. In these lines it is usually bewilderment: what on earth is this, why are they doing that, why is he holding it, how can she laugh like that on her own. It can also be a mild estimate, as in I reckon I could do that too. Do not confuse it with 고 싶다, which is wanting to do something.