Naturally occurring examples of categories where composition depends on objects In the comments and answer to another recent question, it became apparent that category theorists who work with the ‘many hom-class’ definition of a category implicitly view composition as a function of five variables, three of them the objects that define the hom-classes the composable arrows live in.
This is, to put it mildly, very counterintuitive to me. I can’t think of a single time in my years working with (fibered) categories where composition depended on the objects involved, but maybe I just didn’t notice due to not looking for it. To this end,

What are some examples of ‘naturally occurring’ categories $\mathcal{C}$ where we have objects $X,Y,Z,X’,Y’,Z’$ and arrows $$f\in{\bf Hom}_\mathcal{C}(Y,Z)\cap {\bf Hom}_\mathcal{C}(Y’,Z’),$$ $$g\in{\bf Hom}_\mathcal{C}(X,Y)\cap{\bf Hom}_\mathcal{C}(X’,Y’)$$ such that $$f\circ_{_{XYZ}}g\neq f\circ_{_{X’Y’Z’}}g?$$

Any relevant input is appreciated.
 A: Here is a way to see that Brian Shin’s example can be obtained from (standard many-hom-sets presentations of) more general constructions — so this shows clearly that constructions from the standard literature can lead to cases where composition genuinely depends on the objects.
$\newcommand{\C}{\mathcal{C}}\newcommand{\op}{\mathrm{op}}\newcommand{\id}{\mathrm{id}}$First, take the category of elements $\int_{\C^\op} F$ of a presheaf $F : \C^\op \to \mathrm{Set}$ to have:

*

*objects are pairs $(c,x)$, where $c \in \C$, $x \in F(c)$;

*maps $(c',x') \to (c,x)$ are maps $f : c' \to c$ such that $x|_f = x'$.

In particular, applying this over the terminal category $\C = \{*\}$ yields a construction of discrete categories $DX = \int_1 X$ in which all identities are equal: $DX((*,x),(*,x)) = \{ \id_*\}$.
Now, take the Grothenedieck construction of a functor $\newcommand{\D}{\mathcal{D}}\D : \C \to \mathrm{Cat}$ to have:

*

*objects are pairs $(c,d)$, where $c \in \C$, $d \in \D(c)$;

*maps $(c,d) \to (c',d')$ are pairs $(f,g)$, where $f : c' \to c$, and $g : \D(f)(d) \to d'$.

Now take $G$ and $G'$ to be two different groups on the same underlying set, viewed as one-object categories; and consider the functor $\mathcal{G} : D2 \to \mathrm{Cat}$ picking out $G$ and $G'$.  Then the Grothendieck construction of $\mathcal{G}$ recovers Brian Shin’s example: its hom-sets are $\{\id_*\} \times  G$ and $\{\id_*\} \times G'$, i.e. the same set with different composition operations.

That said, let me address where you write:

it became apparent that category theorists who work with the ‘many hom-class’ definition of a category implicitly view composition as a function of five variables […] This is, to put it mildly, very counterintuitive to me.

I really want to convince you it shouldn’t be counterintuitive: it’s just being slightly more explicit about something you’re doing all the time anyway, in many situations.
As in my previous answer, think about group operations (I’ll write multiplicatively).  We think of multiplication as a function of two variables — and for a fixed group, of course, it is.  But with varying groups, it also depends on the group.  And this really matters — for instance, when we take the product of a family of groups $\prod_i G_i$, we define its pointwise multiplication as $(x \cdot y)_i = x_i \cdot y_i$.  Formally of course this must mean $x_i \cdot_i y_i$ — the multiplication used depends on $i$. But this doesn’t disrupt our intuition of it as a binary operation; it just also depends on another parameter i.
Of course, you could avoid that dependence by assuming that the groups in the family must be disjoint, or compatible where they intersect, in order to form the product.  But I think most modern algebraists would find such a restriction highly artificial, and unnecessary anyway — the dependence is nothing to be worried by.  Indeed, once you look for it, this sort of thing is everywhere in mathematical practice.  A large part of Martin-Löf’s original motivation for dependent type theory was analysing how mathematicians use this sort of dependency in practice.  For me, meeting dependent type theory was like Molière’s character learning he’d been speaking prose all his life.
Coming back to the typed-hom-sets definition of category: The point isn’t to focus on the extra dependence on objects.  The point is to let us ignore the question intersection/disjointness of objects, and view it as just as irrelevant as the question of whether different abstract groups are disjoint; and we achieve it by exactly the same mechanism.
A: How about the following. Define a category $\mathcal{C}$ with two objects $A,M$ and the following hom-sets.

*

*$\mathrm{Hom}(A,A) = \mathrm{Hom}(M,M) = \mathbb{N}$, the set of natural numbers (including zero), and

*$\mathrm{Hom}(A,M) = \mathrm{Hom}(M,A) = \varnothing$.

The composition is specified by

*

*$\mathrm{Hom}(A,A) \times \mathrm{Hom}(A,A) \to \mathrm{Hom}(A,A)$ is addition $(n,m) \mapsto m+n$, and

*$\mathrm{Hom}(M,M) \times \mathrm{Hom}(M,M) \to \mathrm{Hom}(M,M)$ is multiplication $(n,m) \mapsto mn$.

Is this "naturally occurring"? Maybe not.
