Note that the table prefix should be ‘order’ instead of ‘orders’.
The difference between the two lies mostly in the total number of returned customers. The former will return all the customers, including ones that have no active orders. The latter will return only the customers who have at least one active order.
And there are no ‘inactive’ orders in the result of the former, because you have modified the definition of the relation to include only the ‘active’ orders. But there are not only ‘active’ orders but also ‘inactive’ orders in the result of the latter, because the definition of the relation is not changed.
Note that the where clause in the former is for the related model, while it is for the main model in the latter.
A key concept: the query for the main model and those for the related models are clearly separated in Yii 2.