If the goal is to estimate $\beta$ in $Y = X\beta + g(Z) + \epsilon$, why is $E[X(Y - X\beta - g(Z))] = 0$? Suppose I have a model
$$Y = X\beta + g(Z) + \epsilon, \qquad E[\epsilon|X, Z] = 0$$
where $Y$ is the outcome, $X$ is a binary covariate of interest, and $Z$ is a vector of covariates. The goal is to estimate $\beta$.
Why is the moment condition for estimating $\beta$ the following?
$$E[(Y - X\beta - g(Z))X] = 0$$
Question 1: what is the definition of a moment condition?
Question 2: why does the above moment condition hold? $E[(Y - X\beta - g(Z))X] = E[\epsilon X] \overset{?}{=} 0$ I don't understand why the second equation sign would hold unless we make additional assumptions?
 A: 
Question 1: what is the definition of a moment condition?

A moment condition is any condition you place on the statistical model which involves moments and an equality or inequality. In this case your moment condition is the moment of the product of an error term and the binary covariate $X$, $\mathbb{E}(\epsilon X) = 0$.

Question 2: why does the above moment condition hold?

It might not. In general this is a commonly assumed identification restriction that is commonly placed on regression models in econometric contexts. There are various statistical test and visual diagnostics that are often used to attempt to confirm this assumption. However, this is nearly always an assumption that is made for the purpose of ensuring identifiability in (frequentist) statistical estimations. Examples where this may not hold are cases where $X$ and $\epsilon$ are both correlated with some confounding measurement, usually called an instrument or instrumental variable.

I don't understand why the second equation sign would hold unless we make additional assumptions?

This generally is an assumption of the statistical model. It may be subject to some debate and statistician or econometrician may do some further analysis to indicate how tenable the assumption is for the application and collected data.
