I've been solving these types of adjoint operator problems:
Find the adjoint of $\mathcal{L}(f)(t) = \dfrac{df}{dt} + e^tf$ with $f(1) = 0$ under the inner-product $\langle\ f , g \rangle = \int^1_{-1} f(t)g(t) \ dt$.
The solutions for such problems follow this line of reasoning:
We need to find the operator $\mathcal{L}^\dagger$, such that $\langle\ \mathcal{L}f , g \rangle = \langle\ f , \mathcal{L}^\dagger g \rangle$.
$\langle\ \mathcal{L}f , g \rangle = \int_0^1 ( f' + e^tf)g \ dt$
$= \int_{-1}^1 f'g \ dt \int_{-1}^1 e^tfg \ dt$
Using integration by parts:
$= [fg]_{-1}^1 - \int^1_{-1} fg' \ dt + \int_{-1}^1 e^tfg \ dt$
$= 0 - f(-1)g(-1) + \int_{-1}^1 (-g' + e^tg)f \ dt$
and hence we need $\mathcal{L}^\dagger(g)(t) = -\dfrac{dg}{dt} + e^tg$ and $g(-1) = 0$.
In the solutions for these adjoint operator problems, we always end up with the product of some functions (in the above case, we had $f(-1)g(-1)$). And in this situation, I have noticed that we always set a function other than the one provided in the problem statement to $0$ (in this case, we set $g(-1) = 0$ instead of $f(-1) = 0$, since we had $f(1) = 0$ in the problem statement.
I will provide another example for the sake of clarity:
Find the adjoint of $\mathcal{L}(f)(t) = t\dfrac{df}{dt} + 2f$ with $f(0) = 3$ under the inner-product $\langle\ f , g \rangle = \int^1_{0} f(t)g(t) \ dt$.
$\langle\ \mathcal{L}f , g \rangle = \int_0^1 (tf' + 2f)g \ dt = \int^1_0 (tg)f' \ dt + \int^1_0 2fg \ dt$
$= [tgf]^1_0 - \int^1_0 (tg)' f \ dt + \int_0^1 2fg \ dt$
$= g(1)f(1) + \int^1_0 [-(tg)' + 2g] f \ dt = g(1)f(1) + \int^1_0 (-tg' + g)f \ dt$
and hence we need $g(1) = 0$ and $\mathcal{L}^\dagger(g)(t) = -t \dfrac{dg}{dt} + g$.
In this case, we had $f$ in the problem statement, and so we chose $g$ such that $g(1) = 0$ instead of $f(1) = 0$.
My question is, why is this the case? Why do we always set a function other than the one in the problem statement to equal $0$ and do the cancelling in our calculations? I'm sure there is a theoretical reason for this, but I have not encountered any reasoning for this.
I would greatly appreciate it if people could please take the time to clarify this.
Let us stick to your first example. You have there $$ \langle\mathcal Lf,g\rangle = \langle f,-g'+e^tg\rangle - f(-1)g(-1). $$ Let $g$ be such that $\mathcal L^\dagger g$ is defined. Then, as $\langle f,\mathcal L^\dagger g\rangle = \langle\mathcal Lf,g\rangle$, we would have, putting $h := \mathcal L^\dagger g + g'-e^tg$, $$\tag{$*$} \langle f,h\rangle = -f(-1)g(-1). $$ This holds for all $f$. In particular, $h=0$ is equivalent to $g(-1)=0$. Now, ($*$) implies (setting $a := |g(-1)|$) $$ a|f(-1)|\le\|h\|\|f\| $$ for all $f$. But in fact, there are sequences $f_n$ with $\|f_n\|=1$ but $|f_n(-1)|\to\infty$ (can you think of one?). Hence, $a=0$ and thus $g(-1) = 0$ (which also gives $h=0$ and thus $\mathcal L^\dagger g = -g'+e^tg$).