Here is my derivation:
An element in $SO(3)$ can be written as $(\vec{v}_1,\vec{v}_2,\vec{v}_3)^T$ with $\{\vec{v}_i\}$ an oriented orthonormal set of basis. The set of possible $\vec{v}_1$ forms an $S^2$, and the choice of $\vec{v}_2,\vec{v}_3$ forms an $S^1$. Therefore, $SO(3)$ is just $S^2\times S^1$.
I know this must be incorrect since $\pi_1(SO(3))=\mathbb{Z}_2$ while $\pi_1(S^2\times S^1)=\mathbb{Z}$, but I don't know where did I go wrong.
Why the $S^2 \times S^1 \cong SO(3)$ Argument Doesn't Work
I don't think any of the other answers really address why your argument doesn't prove that $SO(3)$ is just $S^2 \times S^1$.
Your argument seems reasonable, but there's a crucial flaw. The idea is that we pick a point $p \in S^2$ to identify with $\vec{v_1}$ Fine so far. Now we pick an angle $\theta \in S^1$ which sets the direction of $\vec{v_2}$. It seems like we should be able to do this, but we can't because of the topological properties of $S^2$.
More explicitly, let $\phi : S^2 \times S^1 \to SO(3)$ be your proposed isomorphism, where, as above, $(p, \theta) \mapsto (\text{the ONB with $\vec{v_1}$ at $p$ and with $\vec{v_2}$ at angle $\theta$})$. Consider the map $f : S^2 \to SO(3)$ given by $f(p) = \phi(p, 0)$. That is, $f(p)$ is the ONB with $\vec{v_1^0}(p)$ pointing to $p$ and $\vec{v_2^0}(p)$ at angle $0$. Believe it or not, we've already gone wrong. We've made a continuous choice of tangent vector $\vec{v_2^0}(p)$ to $S^2$ at every point $p$ of $S^2$. In other words, we've attached a non-vanishing tangent vector field to every point of a sphere. The famous hairy ball theorem says that this is impossible. What to conclude? Our original isomorphism must not have actually been well-defined.
What went wrong? It was where we said that $\vec{v_2}$ should be at angle $\theta$. With respect to what? Making a choice of direction with reference to which we measure $\theta$ at each point of $S^2$ is precisely attaching a non-vanishing tangent vector field to every point of the sphere (the vector field that points in the direction $\theta = 0$ at every point). But the hairy ball theorem says this is impossible.
How to Fix the Argument
(What follows will be a sketch. Consult a textbook on fiber bundles for detail and rigor)
Can we fix up your argument? Yes! This is one of the motivating examples for a mathematical structure called a "fiber bundle." We would like to attach $S^1$ to every point of $S^2$, but in a way where it actually does describe $SO(3)$. The resulting space will not be $S^2 \times S^1$, but instead something we call an $S^1$ (or circle) bundle over $S^2$.
We'll have two measurements of angle, $\theta_1$ and $\theta_2$. $\theta_1$ measures the angle between $\vec{v_2}$ and north. This will be a good $S^1$ coordinate everywhere except the north and south pole where there is no well-defined north direction. To make up for this, we'll have to have a $\theta_2$ which we'll arbitrarily decide is the angle between $\vec{v_2}$ and the direction you'd go to get to the intersection of the equator and prime-meridian as quickly as possible (here we are imagining $S^2$ as the Earth).
We have now attached to all points of $S^2$ a copy of $S^1$ with a well-defined $0$ direction. Unfortunately, we've attached two copies of $S^1$ to all but $4$ points, and they don't agree on which direction $0$ is: one copy is "twisted" with respect to the other. But this is not a serious problem. It's very easy to convert between one way of measuring angle and the other, and in fact this can be done smoothly at each point that the two copies of $S^1$ overlap.
By attaching $S^1$ in this "twisted" way, we've turned $S^2$ into a non-trivial fiber bundle. This fiber bundle really is isomorphic (in the right category) to $SO(3)$, and the proof is precisely the argument you sketched in your post. An element of $SO(3)$ is an ONB with $\vec{v_1}$ pointing to a point of $S^2$ and $\vec{v_2}$ at angle $\theta_1$ and/or $\theta_2$ measured as described above.