If we take a 12V battery, according to its work place that it works in different current consume.
How do they make batteries with the same voltage but different current flow, and why?
A 12.6V battery is made from 6 2.1V cells. The voltage of each cell depends on the chemistry of the battery. Two metals and an electrolyte will make a particular voltage. In the case of lead-acid battery, lead and lead dioxide are the metals. The electrolyte is aqueous sulfuric acid. This combination makes 2.1V nominally.
The current capability of the cell depends on the surface area of the cell. One square inch of surface area will be capable of less current than ten square inches. The surface area will add to the size of the battery. The greater the current capability the larger the battery physically.
You can also load or charge a huge battery with much less current than is rated for. The battery will likely work. The specified current is the most the battery can do.
A battery has internal resistance, that can be viewed as an "invisible resistor" wired sequentially with the voltage source. This resistance restricts the charging and discharging current and is smaller for the powerful battery.
How do they produce batteries with the same voltage but different current?
Voltage is determined by the battery chemistry.
Current capability is determined by the electrode surface area.
... and why?
Because starting a big truck engine requires more current than starting a motorbike.