The title essentially says it all. Consider the category $\mathfrak{Top}_2$ of triples $(J,e_0,e_1)$ where $J$ is a topological space, and $e_i \in  J$. There is an obvious generalization of the definition of homotopic maps. Suppose we have selected $(J,e_0,e_1)\in \mathfrak{Top}_2$. We could say that two continuous maps $f,g:X\to Y$ are "$J$-homotopic"  if there is a continuous map $h:X\times J\to Y$ such that $h(x,e_0) = f(x)$ and $h(x,e_1) = g(x)$. We could then define $\pi_1 (X,x)$ to be the set of continuous maps $f:J\to X$ satisfying $f(e_0)=f(e_1)=x$, with $J$-homotopic maps identified. Here  in order to define composition of paths in the naive way, we need to have picked some homeomorphism continuous map from $J$ to $(\{0\}\times J\cup \{1\}\times J)/((\{0\},e_1) = (1,e_0))$, taking $e_0$ to $e_0\times 0$ and $e_1$ to $e_1\times 1$. I have two questions:


Can $([0,1],0,1)$ be characterized as an object in $\mathfrak{Top}_2$ in a purely categorical manner?
When is $\pi_1 (X,x)$ a group? For that matter, when is $\pi_1 (X,x)$ associative?


Essentially, the question comes down to: what properties of $[0,1]$ are needed in order to do homotopy theory?

The answer to 1 is yes.  For the purpose of this answer, a bipointed space is a topological space $J$ equipped with distinct closed points $e_0$ and $e_1$.  As you say, for any bipointed space $J = (J, e_0, e_1)$, we can form a new bipointed space $J \vee J$ by taking the disjoint union of two copies of $J$, identifying the first $e_1$ with the second $e_0$, and giving the resulting space the obvious pair of basepoints.

Theorem: In the category of bipointed spaces $J$ equipped with a map $J \to J \vee J$, the terminal object is the bipointed space $([0, 1], 0, 1)$ equipped with the map "multiplication by 2" from $[0, 1]$ to $[0, 1] \vee [0, 1] \cong [0, 2]$.   

Or informally: $[0, 1]$ has the structure needed in order to be able to define and compose paths, and is universal as such.

The theorem is proved here, and is a variant of a result of Peter Freyd's (which characterized the interval set-theoretically and order-theoretically, but not topologically).  The idea that $[0, 1]$ is universal with the structure needed for homotopy theory is expanded on in these talk slides.
