Intuition goes something like this:
Let $X$ be a finite connected graph. Every tree is contractible, (deformation retractable to a point), therefore if $X$ is a tree then $X \simeq 0$.
Otherwise, consider chordless cycles of $X$, (cycles that don't have subcycles). Any chordless cycle is homotopy equivalent to $S^1$.
Edge is a tree, so for any two chordless cycles sharing an edge, the edge contracts to a point, resulting in homotopy equivalency to $S^1 \vee S^1$. Same goes for $n$ cycles. Therefore, everything besides chordless cycles contracts to a point $x_0$ at which all of $X$'s chordless cycles are wedged at.
Concatenation of trees and chordless cycles makes up any finite graph.
Therefore, any finite graph $X$ with $n$ chordless cycles:
$$X \simeq \underbrace{S^1 \vee S^1 \vee \cdots \vee S^1}_{n\text{ times}}$$