These products were made by American manufacturers for consumers in Japan.
Hope this example can help you understand to some extent. Please do not hesitate to inform us what sentences confused you most in terms of by or for.
Those are the prepositions.Used like---something is done by someone and something is done for someone.Basically "by" is used in passive voice sentences and also some sentences like---what is the time by your watch? etc.