On the other hand, as far as I can tell, a local trivialization of a vector bundle over a contractible neighborhood should force the restriction of the sheaf of sections to be constant over the same neighborhood.
This isn't true at all. When you talk about a vector bundle having a locally constant sheaf of sections, that locally constant sheaf isn't going to be the sheaf of all (continuous) sections of the vector bundle; rather, it is a very special subsheaf of the sheaf of all sections. For instance, if you have the trivial line bundle $X\times \mathbb{R}$ over a space $X$, the sheaf of continuous sections gives you all continuous real-valued functions, while the locally constant sheaf corresponding to the trivial local system consists of only the locally constant real-valued functions. Most spaces have plenty of continuous real-valued functions on them that are not locally constant, so these two sheaves are quite different.
It is true that given a trivialization of a vector bundle, there is a canonical way to turn the vector bundle into a local system (namely, take the locally constant $\mathbb{R}^n$-valued functions). But different trivializations of the same bundle will give rise to different local systems in this way, and so if you have a general vector bundle, it might not be possible to choose local trivializations which give rise to compatible local systems and thus a global local system.
Moishe Kohan's comment contains the answer of the question. This community wiki elaborates it a little.
Let us first observe that if $\xi = (E,p,B)$ is a pre-vector bundle and $f : X \to B$ is a (not necessarily continuous) function on a space $X$, we get a pullback pre-vector bundle
$$f^*(\xi) = (f^*(E), p^*,X)$$
where
$$f^*(E) = \bigcup_{x \in X} \{x \} \times p^{-1}(f(x)) \subset X \times E$$
and $p^*$ is the restriction of the projection $X \times E \to X$.
Now we generalize the construction of the question (see [1]). Define
$$\mathbb K^\infty = \{(x_i)_{i \in \mathbb N} \mid x_i \in \mathbb K, x_i = 0 \text{ for almost all } i \} .$$
This is a vector space with an obvious inner product and we may regard each $\mathbb K^n$ as a genuine subspace of $\mathbb K^\infty$. Doing so, we have $\mathbb K^\infty = \bigcup_{n \in \mathbb N} \mathbb K^n$.
For $0 \le m \le \infty$ and $k \in \mathbb N$ let $G_k(\mathbb K^m)$ denote the set of all $k$-dimensional linear subspaces of $\mathbb K^m$. For $m < \infty$ these are the well-known Grassmann varieties. Each $G_k(\mathbb K^n)$ is a genuine subspace of $G_k(\mathbb K^{n+1})$, and we define $G_k(\mathbb K^\infty) = \bigcup_{n \ge k} G_k(\mathbb K^n)$ as a set, and $U \subset G_k(\mathbb K^\infty)$ to be open iff $U \cap G_k(\mathbb K^n)$ is open in $G_k(\mathbb K^n)$ for all $n$. Thus $G_k(\mathbb K^\infty)$ is the direct limit of the sequence of spaces $G_k(\mathbb K^n)$ bonded by inclusions.
The tautological (or canonical bundle) $\gamma^m_k$ over $G_k(\mathbb K^m)$ has as total space
$$E^m_k = \bigcup_{V \in G_k(\mathbb K^m)} \{V\} \times V \subset G_k(\mathbb K^m) \times \mathbb K^m$$
with obvious projection $\pi$ onto the base. The fiber over $V \in G_k(\mathbb K^m)$ is nothing else than $\{V\} \times V$, i.e. a copy of $V \subset \mathbb K^m$. Again we have $E_k^\infty = \bigcup_{n \ge k} E_k^n$. It is well-known that $\gamma^m_k$ is locally trivial.
Now let $f : B \to G_k(\mathbb K^m)$ be any (not necessarily continuous) function. The pullback pre-vector bundle $f^*(\gamma^m_k)$ over $B$ has as total space
$$f^*(E_k^m) = \bigcup_{b \in B} \{b \} \times \pi^{-1}(f(b)) = \bigcup_{b \in B} \{b \} \times \{f(b)\} \times f(b) \subset B \times G_k(\mathbb K^m) \times \mathbb K^m .$$
In general this is completely erratic. Let us say that $f^*(\gamma^m_k)$ is continuously parameterized if $f$ is continuous.
Note, however, that $f^*(\gamma^m_k)$ is not the same pre-vector bundle as $\xi(f)$ which was defined in the question. But $f^*(\gamma^m_k)$ is continuously parameterized if and and only $\xi(f)$ is. It seems that we now habe an adequate interpretation of "the spirit of a vector bundle is to continuously parametrize a family of vector spaces by $B$", at least for pre-vector bundles of the form $f^*(\gamma^m_k)$ and $\xi(f)$.
Fact 1. If $f^*(\gamma^m_k)$ is continuously parameterized, then it is locally trivial.
This is well-known. Pullbacks of vector bundles along continuous maps are always vector bundles. This shows that being continuously parameterized is even stronger than locally trivial.
Fact 2. If $f^*(\gamma^m_k)$ is locally trivial, then it is continuously parameterized.
Let $s_0 : B \to f^*(E_k^m) \subset B \times G_k(\mathbb K^m) \times \mathbb K^m$ be the zero-section which is given $s_0(b) = (b,f(b),0)$. Each $b \in B$ has an open neighborhood $U \subset B$ such that the restriction of $f^*(\gamma^m_k)$ to $U$ is trivial. This implies that $s_0 \mid_U$ is continuous. Since the projection $p_2 :B \times G_k(\mathbb K^m) \times \mathbb K^m \to G_k(\mathbb K^m)$ is continuous, we see that $f \mid_U = p_2 \circ s_0 \mid_U$ is continuous. Thus $f$ is continuous.
Fact 3. If $f$ is continuous, then $f^*(\gamma^m_k)$ and $\xi(f)$ are isomorphic. In particular, $\xi(f)$ is locally trivial.
To see this, define $\phi_f : B \times \mathbb K^m \to B \times G_k(\mathbb K^m) \times \mathbb K^m, \phi(b,v) = (b,f(b),v)$. We have $\phi_f(E(f)) = f^*(E_k^m)$ so that we get an induced $\phi'_f : E(f) \to f^*(E_k^m)$ which is bijection which maps the fiber over $b$ in $E(f)$ by a linear isomorphism to the fiber over $b$ in $f^*(E_k^m)$. It is continuous iff $f$ is continuous. Next define $\psi : B \times G_k(\mathbb K^m) \times \mathbb K^m \to B \times \mathbb K^m$ as the projection. Clearly $\psi$ is continuous and $\psi(f^*(E_k^m)) = E(f)$. Hence the restriction $\psi_f : f^*(E_k^m) \to E(f)$ is a morphism of pre-vector bundles which is continuous and fiberwise linearly isomorphic. It is an isomorphism of pre-vector bundles iff $f$ is continuous.
Best Answer
From the perspective of $K$-theory, the point of vector bundles is to be able to classify them. That is, given a space $X$, we want a nice classification of all vector bundles (up to isomorphism, or up to stable equivalence) which can both provide a useful invariant of $X$ and give us information about specific naturally occurring vector bundles we might care about.
The local triviality condition makes classifying vector bundles tractible and have deep relationships to other natural questions in topology. Very crucially, the local triviality condition makes it possible to prove that vector bundles are homotopy invariant (at least assuming all our spaces are paracompact): that is, given a vector bundle on $X\times[0,1]$, the two vector bundles on $X$ you get by restricting to $X\times\{0\}$ and $X\times\{1\}$ are isomorphic. In particular, then, a vector bundle on a contractible space is trivial, so if we cover our space by contractible open sets, we can classify vector bundles by thinking about the possible ways to glue together trivial bundles over those open sets via transition functions. This also makes it possible to classify vector bundles in terms of homotopy classes of maps into Grassmannians, which opens up all sorts of connections to homotopy theory such as Bott periodicity.
If you don't require local triviality, then classifying vector bundles is immensely more complicated and intricately related to the exact topology of your space, rather than just its homotopy type. In particular, for instance, if you partition your space $X$ into arbitrary subsets, you could take any vector bundles of the same rank over each of those subsets and just take their disjoint union to get a vector bundle on $X$. There are many more complicated examples. Basically, classifying vector bundles becomes an incredibly complicated pointset topology question and completely useless for any sort of computable invariant.