I've seen it stated in several sources and lecture notes for Abstract Harmonic Analysis that for a locally compact group $G$, $L^{1}(G)$ is unital if and only if $G$ is discrete.
What about the locally compact group $\mathbb{T} = \{\lambda\in\mathbb{C}: |\lambda| = 1\}$, which is not discrete because the arclength measure of a point on the unit circle is $0$.
But since it is compact, the constant function $1\in L^{1}(G)$.
The multiplication in the algebra $L^1(G)$ is convolution, not the pointwise product. For groups like $\mathbb{T}$ or $\mathbb{R}^n$, the pointwise product of $L^1$ functions is generally not in $L^1$.
You can extend the convolution to the space of Borel measures of bounded variation, and then you get a unital algebra, where the unit is the Dirac measure (point mass) in the unit of $G$. You can represent a point mass as an $L^1$ function with respect to the Haar measure only if singletons have positive measure. That is the case only if $G$ is discrete.