I don't understand how is this even possible(the question stated below), as in a previously stated theorem that the $\oint\mathbf F\,\mathrm{d}\mathbf{r}$ of conservative field vector is zero. So what is the difference between these two examples
If $\mathbf F(x,y)=\frac{-y i+x j}{x^2+y^2}$, show that $\oint\mathbf F\,\mathrm{d}\mathbf{r}=2\pi$ for every positively oriented simple closed path that encloses the origin.
The integral $\oint F\cdot dr$ being zero for any closed path is the definition of a conservative field. (At least it is in my book; I would find anything else strange, as that integral captures the notion of conservation.)
On the other hand, an irrotational vector field (i.e. a vector field with no curl) can fail to be conservative if it has points where it's not defined. If a vector field is defined, continuous and irrotational on the whole plane (or more generally on a simply connected domain), then it is conservative. In this case, however, the origin is a problem point, obstructing our field from being conservative.