  We study a sample of bar-like galaxies in the Illustris TNG100 simulation, in
which almost the whole stellar component is in the form of a prolate spheroid.
The sample is different from the late-type barred galaxies studied before. In
addition to the requirement of a high enough stellar mass and resolution, the
277 galaxies were selected based on the single condition of a low enough ratio
of the intermediate to long axis of the stellar component. We followed the mass
and shape evolution of the galaxies as well as their interactions with other
objects and divided them into three classes based on the origin of the bar and
the subsequent history. In galaxies of class A (comprising 28% of the sample),
the bar was induced by an interaction with a larger object, most often a
cluster or group central galaxy, and the galaxies were heavily stripped of dark
matter and gas. In classes B and C (27% and 45% of the sample, respectively)
the bars were induced by a merger or a passing satellite, or they were formed
by disk instability. Class B galaxies were then partially stripped of mass,
while those of class C evolved without strong interactions, thus retaining
their dark matter and gas in the outskirts. We illustrate the properties of the
different classes with three representative examples of individual galaxies. In
spite of the different evolutionary histories, the bars are remarkably similar
in strength, length, and formation times. The gas fraction in the baryonic
component within two stellar half-mass radii at the time of bar formation is
always below 0.4 and usually very low, which confirms in the cosmological
context the validity of this threshold, which has previously been identified in
controlled simulations. Observational counterparts of these objects can be
found among early-type fast rotators, S0 galaxies, or red spirals with bars.
