If $u:[0,T] \to X$ for a Banach space $X$ is such that $t \mapsto \lVert u(t) \rVert_{X}$ is measurable and $\int_0^T \lVert u(t) \rVert_X^2 $ is finite, does $u \in L^2(0,T;X)$?
The usual definition of Bochner space requires measurability of $u:(0,T) \to X$.
This is already false for $X=\mathbb{R}$: take a nonmeasurable set $E\subset [0,T]$ and define $$ u(t) = \begin{cases}1\quad & t\in E,\\ -1\quad & t\notin E \end{cases} $$ The $|u|$ is nice but $u$ is bad enough that $\int_0^T u$ cannot be reasonably defined. Such $u$ is not an element of $L^2$ under any definition.