The question requires care when interpreting what "taking direct products mean". One way to interpret this is: given two algebraic structures $A,B$ of the same kind, where $A,B$ are sets with extra structure, when will the same structure not be defined naturally on the product $A\times B$ as sets". This interpretation is open to some debate due to the use of the word 'naturally'.
Another interpretation uses the categorical framework and leads to two possible precise interpretations. Once you fix your favourite algebraic structure you can consider the category of all those algebraic structures together with their structure preserving functions (almost always will this indeed yield a category). Call this category $C$. Assuming that a typical algebraic structure of interest consist of a single set together with extra structure, there is a forgetful functor $U:C\to Set$. The question now becomes: if $C$ admits binary categorical products does the forgetful functor commute with binary products. I think this is a precise way to interpret what you had in mind. One instance where the answer is yes is when this forgetful functor has a left adjoint. That means that whenever free structures exist the answer to your question is: products are always constructed naturally on the cartesian product of the underlying sets.
This happens, for instance, for groups (since free groups exist), for abelian groups (since free abelian groups exists) etc. but not for fields (free fields do not exist). Non-algebraic cases fit into this setting as well, including examples from topology and analysis.
Another possible interpretation is to wonder whether the category $C$ at all admits products. For instance, the category of all cyclic groups doesn't have all binary products.