When the quantity field in the Opportunity Line Item object is updated by a Workflow rule or a Process builder, the sales price value adjusts automatically.
Example:
A process sets quantity value to 10 when the Product in the Opportunity Line Item is equal to "Pack Of Ten"
A user adds the "Pack Of Ten" Product to the Opportunity and sets the following values
Quantity = 100
Sales Price = $100
After Saving the record it will show the following values in the Opportunity Line Item record:
Quantity = 10
Sales Price = $1000
This is an expected behavior.
According to https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_opportunitylineitem.htm,
Although the user updated the sales price (API Name: UnitPrice), after saving, the process updates the record's quantity value but did not specify the sales price value. This meets the above condition which makes the sales price.
Note: As of 2025, Workflows and Process Builder will be depreciated: https://help.salesforce.com/s/articleView?id=001096524&type=1
000381172

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.